| Exploring Solution Spaces © Copyright 2003-2006, by C. Keith Ray | ||||||||||||||||||||||||
|
Archives
Subscribe |
2004.Jul.31 Sat Alistair Cockburn's chapter on project-tracking using burn-up charts, burn-down charts, "iceberg lists", and earned-value: http://alistair.cockburn.us/crystal/articles/evabc/earnedvalueandburncharts.htm 2004.Jul.27 TueAn alternative implementation of the function alloc(size_t size) could be defined to return a pointer to a block of memory that has the size at the front of it. In fact, this is how many implementations of these library functions are implemented -- but it wasn't standardized, and it wasn't made typesafe -- on those implementations where this was done, alloc would return a pointer to the data portion of the block, and you would have to "back up" and typecast the pointer to get the length portion of the block. A semi-typesafe example:
struct MemoryBlock
{
size_t block_size;
unsigned char block_data[]; // unbounded array
};
MemoryBlock* Alloc( size_t sizeIn );
void Free( MemoryBlock* blockIn );
While this has the benefit of less space on the "client" side of the function (retaining one pointer instead of a struct with two fields) the danger of this style is that heap corruption is more likely - bad code writing past either end of the data field can erase those block_size fields. Consider all the debugging tools we have today - would we need Purify, SmartHeap, and all those other tools as much if library functions like alloc and free had been implemented in a more object-oriented fashion? I'm currently trying to debug some code (not written by me) that mixed C and C++ memory-management: it used "free" on memory allocated by "new char[]" and "delete []" on memory allocated by "alloc". I think these functions were smart enough not to work with memory that the other set of functions allocated, so there were memory leaks. In some implementations, these functions might be safely interchangeable for non-object allocations, in other implementations you can expect crashes. So I fixed the code to be consistent, but I'm also getting crashes because some C++ objects are being deleted more than once [messing up the heap]. Apple's DebugMalloc provides some help in determining when the heap is messed up, but the irony is that DebugMalloc's leak detection feature works by implementing a form of garbage collection - it reports a leak when a memory allocation is no longer being pointed to. If I had real garbage collection, (or if the original coder had used boost::shared_ptr) I wouldn't have to worry about double-deletes. 2004.Jul.26 MonBad APIs start at the very beginning. For example, the C function alloc(size_t size) - a function to allocate memory in the heap - creates a block of memory; but what does it return? Not a data-structure describing the block, but half of that information, just the pointer. Imagine what could have happened if that function has been defined correctly:
struct MemoryBlock
{
char* block_start;
size_t block_size;
};
MemoryBlock Alloc( size_t sizeIn );
void Free( MemoryBlock * blockIn );
If these two pieces -- pointer and length -- were always kept together, then other data-types implemented in C, like strings could have been safer... void StringCopy( MemoryBlock* destString, MemoryBlock* sourceString );2004.Jul.20 Tue Eventually, every programmer has to learn to make sustainable improvements in code that maintain or improve the goodness of its design, rather than unsustainable "patching" of code, which degrades the goodness of its design. Someone complains that members of his team are patching code instead of improving it, and therefore Extreme Programming isn't "scalable". The fact is, this lesson about the inappropriate use of "patching" is something that needs to be learned even if the team isn't doing XP. If it is doing XP, they are going to learn this lesson more quickly and more obviously than they would in a non-XP environment: their velocity is going to slow down over time until they can't create any new user-value within a single iteration. They will be forced to start refactoring ("refactoring" means improving the design of the code, not "rewriting" as many people seem to think). It seems that many if not most first-time XP teams have to learn the importance of refactoring from experience. How do people know when a chicken or some other bird has avian flu? Does it get a runny beak? Can chickens sneeze? 2004.Jul.13 Tue
Notes From the WWDC Keynote (seen on video)
WWDC 2004 - 3500 developers attending - 17% increase over last year Apple Stores - started 3 years - now have 80 stores 20 million visitors per year 250 million $ sales of third-party software ginza store in tokyo itunes music store - 70% market share for legal downloads, europe 62% of sales, 700,000 songs ipod = 50% market share by units sold airport express & airtunes - rendezvous for your home stereo - lossless compression and encryption - itunes streaming to target base station BMW - 3 series, minicoopers, etc., dealer-installed connection for ipod (in glove box) and car stereo/stereo-controls. all powermacs are dual processor now. 1.25 gigahertz bus - faster than pcs ibm = 2.0 to 2.5 gigahertz - 25.% increase intel = 3.2 to 3.6 gigahertz - 12% increase LCD displays - competitors buy the panels that apple rejects 20-inch, 23-inch aluminum, connect to pcs, macs, powerbooks, and 30-inch aluminum (g5 only with special video card using two dual-dvi connections). G5 can drive two 30-inch displays - 8 million pixels (single display) 2500x1600 4.1 million pixels 77% more than the 23-inch, $3299 ; all have dual firewire and usb ports built in - single cable that splits, dvi connection. panther - pixlet? - 12 million users - 50% of installed base - no other "new OS" has this many users, - 12,000 applications "transition is now over" industry has had only three major OS transitions so far apple II to MacOS 1984 DOS to Win95 - 1995 MacOS to MacOS X - 2000 Win95 +etc to Longhorn - 2007 microsoft office 2004 - "better than windows version" borland - java tools quark oracle - 10g database peoplesoft sun - java tools alias - bob bennet - maya complete - 25% of maya sales are for mac - alias sketchbook pro - 70% of downloads are for mac - maya unlimited "cloth, hair, fluid" effects used in games and movies - Lord of the Rings MYST IV - Revelation - simultaneous release on Mac and PC - music by peter gabriel guitar rig - low-latency audio - daniel haver - garage band plugin (and stand-alone) - foot controller to step through pre-sets, custom tones, sounds like analog instruments/amps/etc. studio and live-stage performances orbit - aran anderson - satellite simulations - 650 actual unclassified sats - computations to locate these used to take super-computer, developed in 3 months using xcode (one developer) - free freefall screen saver to ship macos x 10.4 tiger - ship 2005 "first half of year" - apple is again innovator and others will be following ('other people still trying to copy panther') - 150+ new features - OS X is #1 "unix" os by unit shipments - new feature 64-bit for any process, 64-bit system library, can also run 32-bit processes, LP64 GCC support, better SMP fine-grain locking, XGRID built-in, access control lists improved SMB performance, home directories, Kerberos and NTLMv2 authentication, HTML email, word tables in TextEdit search - itunes search is fast, now do the same thing in the rest of OS - "spotlight" - standard files formats, extensible, works with current apps, spotlight integrated into address book, mail, system preferences, and finder, search copyright metadata, search fields built into finder window, search by "color space" to find CMYK images, save queries as "smart folders" spotlight addressbook - save a query as a "smart group", search birthday "within next seven days" spotlight mail - search 50,000 messages instantly, save a query as a "smart mailbox" spotlight prefers - removed "favorites" bar - search for prefs related to "keyboard" or "desktop" including synonyms for microsoft terms ilke "wallpaper". ("wifi" = "airport" = "802.11") search for "everything abuot bertrand" across multiple apps - system-wide search in menu bar - shows pop-down list for images, movies, mail messages, address book contacts, pdf documents (like "half dome" in a PDF map), can show in window for complete lists, sort by kind/date/people spotlight sdk "today" H.264 - quicktime video - standard codec from MPEG group for high-def DVDs, scalable from high-def down to "3G" cell phone - open industry standard, frank casanova - 250 million copies of QuickTime shipped, can display high-def image as same data-rate as today's std-def DVD rates, will be built into DVDs soon. safari web browser - RSS and Atom support - "personal clipping service" - searching "tons of rss feeds" and save queries as bookmarks, sort by date or "this week", time, source of article, change length of articles to display in list format, i-tunes store has RSS feed of "top ten songs", group feeds together in 'tabs' "core audio" already shipping - "core image" & "core video" to ship in tiger - uses "GPU" to do graphics processing in floating-point. allows real-time filters, 100+ filters built-in. extensions via "image units" and "video units" phil schiller - "fun-house" demo app - over a billion floating-point calcs per second - "stack many effects" on top of each other - built on top of quartz - effects can be applied to text, non-destructive, live, active - any of the stacked filters can be tweaked independently, apply filters to quicktime video, implemented in one person-week in xcode ".mac" - half a million subscribers - sync engine built-into tiger, .mac preference panel, sync email, calendars, address boosk, etc., across .mac and multiple macs - sync sdk for other apps to use. dashboard - "expose for widgets" - built on webkit - javascript - little accessory apps - calculator, address book, itunes, stickie, stock tracker, web-cam viewers, and others. one button to bring up the widget collection, single-key-press to show/hide all the widgets - sdk available today automator - visual scripting - interactive scripts, 100 actions built-in, share and email scripts, iLife, email and access to other apps - sal soghoian - script to grab images from web (.mac home pages) - icons for various popular 'categories', list of actions for each category - drag action to "work-flow area" - automatically link actions together, click various settings for each action [radio buttons, pop-up menus, etc.], looks like this 'settings' GUI may be generated from applescript 'dictionary' of various apps. save "work-flow" scripts "into" various applications like Safari - makes scripting about as easy as hypercard, but different UI - SDK shipping today ichat - personal video conferences that "just worked" - now using H.264 - multiple users - 10 chatters for audio + 3 with video/audio - the 3 video feeds are joined into a single image/window - the 2nd and 3rd video feeds have a "perspective" look to them. [actually 4 videos - yourself is shown in small image] developer copy of Tiger today Brad Appleton wrote a very good post on the XP mailing list about his experience with a Little-League baseball coach who collected a lot of metrics, using them to improve the kids' game, but not using them as rewards or incentives (or blaming/dis-incentives.) A few quotes:
|
|||||||||||||||||||||||