{"id":175,"date":"2008-05-05T19:07:47","date_gmt":"2008-05-06T00:07:47","guid":{"rendered":"http:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/175"},"modified":"2008-05-05T19:46:16","modified_gmt":"2008-05-06T00:46:16","slug":"whats-the-perfect-api","status":"publish","type":"post","link":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/175","title":{"rendered":"What’s the perfect API?"},"content":{"rendered":"

I was skimming a rant<\/a> by someone on arstechnica about how badly messed up Win32 APIs are and how superior everything else is, when this paragraph grabbed my attention:<\/p>\n

\n

The reason must be that no one in Microsoft actually gives a damn. <\/font>Each group develops their own UI widgets in their own style and they simply don’t care<\/em> that it’s a total mess. They don’t care that I have to learn new ways of doing the same task just because they couldn’t be bothered to do things the same way as other applications. I’m not saying, for example, that they shouldn’t have introduced the ribbon concept in Office 2007, because it seems to work pretty well, and I can believe that it really is a better UI model. But they should have taken stock of what they were doing and made it a system-wide UI device. New widgets and UI models do crop up from time to time, but they should be rare, and when they do appear, Microsoft should make them general so that everyone can use them.<\/p>\n<\/blockquote>\n

The article\/post contained a lot of conjecture <\/strong>and fact-less information up to that point, and had strayed into the Vista-bashing camp that so many love when that paragraph smacked me. It’s where I went from having very little respect for the author to near zero. I mean seriously — how could you honestly write that no one cares at Microsoft? Not a single person? Right<\/strong>. There are some misguided teams and products at Microsoft from time to time (and some great products that are canceled), and maybe some products that he or I don’t agree with, but come on — there’s plenty of people who want to produce a product that others will use and enjoy (or at least find useful)! Does the author of that article honestly think, Microsoft employees get up in the morning, and think to themselves, I couldn’t care less about my future or any of my customers — I’ll go do the least amount of work I can to get my job done — and produce something barely adequate.<\/p>\n

I frequently see someone posting, “I’m joining Microsoft … so that I can not make a difference and not care!”<\/p>\n

A few other zingers from the post…<\/p>\n

If you develop software for a living, and were to say something to me in an interview like this:<\/p>\n

\n

Another example; Win32 has a function for getting the size of a file. File sizes on Windows are limited to 2^64 bytes, and so they need a 64-bit integer to be expressed easily. But the API call to get the size of a file doesn’t give you a 64-bit value. Instead, it gives you a pair of 32-bit values that have to be combined in a particular way. For 32-bit Windows, that’s sort of understandable; 32-bit Windows is, well, 32-bit, so you might not expect to be able to use 64-bit integers. But if you use the same API in 64-bit Windows, it still gives you the pair of numbers, rather than just a nice simple 64-bit number. While this made some kind of sense on 32-bit Windows, it makes no sense at all on 64-bit Windows, since 64-bit Windows can, by definition, use 64-bit numbers.<\/p>\n<\/blockquote>\n

It shows such an immaturity of what it takes to do long term programming (not just one-off programming for hobbies) and API maintenance that you’d be a “no-hire.” Dude, do you seriously want to conditionalize all of your code just so you can recompile on 64 bit Windows? Do you want a new API just for that? Seriously, what’s the gain?<\/p>\n

So clearly, …<\/p>\n

\n

So Windows is just a disaster to write programs for. It’s miserable. It’s quite nice if you want to use the same techniques you learned 15 years ago and not bother to change how you do, well, anything, but for anyone else it’s all pain. I thought before that Microsoft cared about people like me. But it doesn’t. And it makes programming on Windows painful. Microsoft is great at backwards compatibility\u2014you can take really old programs and compile and run them on a brand new Windows\u2014but terrible at design and terrible at providing a good experience.<\/p>\n<\/blockquote>\n

He applauds OSX at some point — coming to the conclusion that the Mac OSX APIs are genius … never mind the fact that Apple had to start over from scratch and every application needed to be rewritten (and the fact that the whole thing was inspired by the NeXT OpenStep). Maybe they are wonderful — I’ve only dabbled (but seriously, Objective C??!?). Microsoft could have done that too — but when you have the market share Microsoft has — can you truly afford to do that? No way<\/strong>. Hundreds of millions of people every day use legacy software on modern Windows operating systems because Microsoft made the difficult choice to keep supporting them.<\/p>\n

As the author goes on to say, it causes the internals of Windows to be less than completely desirable as it is forced to maintain a level of compatibility with old APIs and peculiarities of older versions of Windows. Are there people working at Microsoft right now who would love to just start fresh with a clean slate? Abso-freakin-lutely<\/strong>. But, business needs often come first in the world of making money. Microsoft was able to keep existing products running because of the design of their OS and APIs made it possible. Apple couldn’t with OS 9 and earlier when upgrading. When they can completely virtualize a Win32 process seamlessly — then they can start fresh.<\/p>\n

\n

Taken alone, these are all fairly minor things. Put together, the interface is just completely shambolic. It looks amateurish. The quirks of each new interface have to be learned anew. This slap-dash approach to look-and-feel gives the impression of a platform that no one really cares about.<\/p>\n<\/blockquote>\n

The author seems to believe that everyone at Microsoft should just work together and produce products at the same time on the same ship schedules — as every one should contribute the “whole” and produce things that are only good for the masses. They aren’t allowed to innovate on their own or produce something unique or better than another team. “Just stick the widget into the OS … we’ll ship when you’re ready … and we’ll happily adapt to any changes that any other team needs to make.”<\/p>\n

If the author had chosen to research and provide facts, better understand the development environments, platform capabilities, and stick to a point, it might have been a mildly interesting read — but alas, he did not. It got my blood boiling …, hence my post. Maybe Microsoft, who couldn’t care less according the author, will nonetheless contact him to get feedback on how to build the perfect API. Clearly it can’t ever have a backwards-compatibility layer or object model … so it just has to be perfect right out the door. :-P<\/p>\n

What is the perfect API? For rich or a reach application? Give it a little thought right now. What comes to your mind right away?<\/p>\n","protected":false},"excerpt":{"rendered":"

I was skimming a rant by someone on arstechnica about how badly messed up Win32 APIs are and how superior everything else is, when this paragraph grabbed my attention: The reason must be that no one in Microsoft actually gives a damn. Each group develops their own UI widgets in their own style and they […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4,3],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pd5QIe-2P","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1442,"url":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/1442","url_meta":{"origin":175,"position":0},"title":"Nest Thermostat API\/Protocol","date":"January 8, 2012","format":false,"excerpt":"While Nest Labs hasn\u2019t released a formal (documented & supported) API, I thought I\u2019d do a bit of digging to see how they\u2019re using the network and what might be achievable. A few things are going on, the majority as you\u2019d probably expect. The web interface is using a long\u2026","rel":"","context":"In "Coding"","img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/www.wiredprairie.us\/blog\/wp-content\/uploads\/2012\/01\/image_thumb7.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2224,"url":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/2224","url_meta":{"origin":175,"position":1},"title":"Flutter Demo application linking to BoardGameGeek.Com’s Hot Game List","date":"February 26, 2018","format":false,"excerpt":"I've built a slightly more interesting application using Flutter.\u00a0 Using an XML feed from BoardGameGeek's API, the application displays a list of the current hot games complete with thumbnail images. Here's the code. I used a standard Flutter app template and also added a few packages to the project. I've\u2026","rel":"","context":"In "Coding"","img":{"alt_text":"Hulk Smash Layout","src":"https:\/\/i0.wp.com\/www.wiredprairie.us\/blog\/wp-content\/uploads\/2018\/02\/2018-02-26-19_45_39-Hulk-Smash-Meme-Generator-Imgflip.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":172,"url":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/172","url_meta":{"origin":175,"position":2},"title":"Silverlight — it ain’t your papa’s WPF","date":"May 1, 2008","format":false,"excerpt":"John Gossman, architect of the WPF team (desktop and subset taht supplies UI framework for Silverlight), discusses a few of the pain points developers and designers are facing today with WPF to Silverlight portability. From his post: The above example is a bit of a special case, and I don't\u2026","rel":"","context":"In "Coding"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":217,"url":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/217","url_meta":{"origin":175,"position":3},"title":"The ASP.NET Single Page Interface and AJAX Patterns","date":"May 9, 2008","format":false,"excerpt":"Posted on MSDN, by Dino Esposito, \"Single Page Interface and AJAX Patterns.\" What is it? From the article... Single-Page Interface Model To take full advantage of AJAX, you need to have all of your features, or at least most of them, in a single page. This is known as the\u2026","rel":"","context":"In "Coding"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":543,"url":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/543","url_meta":{"origin":175,"position":4},"title":"Where do you "event"?","date":"September 4, 2008","format":false,"excerpt":"From JohnPapa.net, \"Siliverlight 2-Tip - Declaring Events.\" He thinks that the place to wire up an event is always in code rather than in markup (like XAML). \"What\u2019s my opinion? I firmly believe the handlers belong in the code and not in the XAML.\" I'd suggest that's not always right\u2026","rel":"","context":"In "Coding"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1631,"url":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/1631","url_meta":{"origin":175,"position":5},"title":"Nest Thermostat, Software Update 2.0","date":"April 10, 2012","format":false,"excerpt":"Nest recently released a new update to the software of the thermostat device (as well as their corresponding web and mobile applications). Some of the details may be found on their blog. A few of the new features include an historical view of the heating\/cooling usage: On Friday, April 6th\u2026","rel":"","context":"In "General"","img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/www.wiredprairie.us\/blog\/wp-content\/uploads\/2012\/04\/image_thumb1.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.wiredprairie.us\/blog\/index.php\/wpjson\/wp\/v2\/posts\/175"}],"collection":[{"href":"https:\/\/www.wiredprairie.us\/blog\/index.php\/wpjson\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wiredprairie.us\/blog\/index.php\/wpjson\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wiredprairie.us\/blog\/index.php\/wpjson\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wiredprairie.us\/blog\/index.php\/wpjson\/wp\/v2\/comments?post=175"}],"version-history":[{"count":0,"href":"https:\/\/www.wiredprairie.us\/blog\/index.php\/wpjson\/wp\/v2\/posts\/175\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wiredprairie.us\/blog\/index.php\/wpjson\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wiredprairie.us\/blog\/index.php\/wpjson\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wiredprairie.us\/blog\/index.php\/wpjson\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}