Michael Latta's profileMichael's CornerBlogLists Tools Help

Blog


    September 23

    WPF Object Model

    The object model for WPF allows for "inheritance" of property values from one object to another.  If an element does not have the background set, it looks for the next object in the chain that might have it set.  There are several chains to be checked for such values, resulting in a model with multiple inheritance at the instance level.  This model looks remarkably like the object model for the Self language, and not that well supported by currently popular languages such as C#, Java, or even Python/Ruby.  I would like to see Microsoft design a dynamic language that has an object model that maps well to the systems they are promoting.  This new language should support the features of WPF directly (sparse properties, attached properties, instance inheritance, multiple delegation chains, etc), and those that WWF and WCF promote (loose coupling, interface based design (WSDL), graphical specification of behavior defined at run-time rather than a separate compile/link step).  That is the role of computer languages.  They should take the best practices of the present systems and move them into a language based semantic that is codified to make it easier to use and understand.  Rather than systems being driven by convention, the language should step up and directly encode these best practices and allow users to ignore the underlying details.
    July 26

    The danger of incremental development

    I have been reviewing my job queue (todo list for our CM system) today and notice a ton of jobs that have partial implementations and think I can articulate the dangers of doing small projects.  Our project management always wanted things broken up into phases and smaller projects because they asserted that we never got the big projects done in our resource constrained environment.  I think there is an equal or greater risk of this approach killing the product.  See the flowchart below:

     

    1)       Select a project to work on with the highest current priority.

    2)       Work on selected project to add one phase worth of features.

    3)       Turnover changes for work performed.

    4)       Go to step 1

     

    This is the model of how our group is supposed to operate in getting work done.  The problem is that when we break up big projects into small pieces only the first piece gets done.  Upon completing the first phase of a project we stop to reevaluate priorities.  It is very common for a project to be abandoned at this point to the lingering death of the job queue.  The relative priority of a feature that is partially complete almost never competes with a feature that has not started yet.  It is so easy to say “there is a way to do A so B is higher priority” even when this means the product does not do anything well.

     

    The agile methodologies suffer from this as well if there is resource constraints or the domain experience is not top notch.  Build a story in feature area A then move on to a story in feature area B.  It becomes too easy to avoid elegance and complete solutions for partial solutions that have workarounds.

     

    Design a solution to the full problem with as much understanding as you can collect.  That way you do not need to revisit that part of the product for a long time.  This of course requires that you have funding and the willingness to solve a smaller problem well with the same resources you could solve a larger problem poorly.  For in-house projects it is harder to make that case, but for commercial products I say it is the only way to go.  There are many of course that would argue that lots of money was made building partial solutions and selling upgrades that are still partial solutions.  I just do not know anyone that likes using those products.  The products that have deep user loyalty are those that deeply understand and address a problem, even if the scope of the tool is very focused.

    June 03

    Office 2007 Beta 2

    After a bit of playing with Office 2007 I have several first impressions:
     
    1) I generally like the new UI, but I do not like their partitioning of the commands.  I do not do a lot of the things they put on the main tab, and do many things on the other tabs.  I have yet to figure out if I can build my own tab and put what I want on it, like I can do with existing tool bars.
     
    2) It is SLOOOOOOOW.  The first rule of applications is that it must keep up with the user's typing.  Office 2007 Beta 2 does not do this in the worst way.  I have had a single character take a second to appear after being pressed.  I have had whole words blink into existence as the program caught up to my typing.  This makes it hugely frustrating, and generally unusable, regardless of how pretty it is.
     
    3) I like many of the new PowerPoint designs, and I like that the slide is edited in the rendered view rather than text appearing in a different font/background while it is edited.  But, see #2 above.  If it can not keep up with my typing go back to the old way of editing text.
     
    4) The PPT exporter is either very bloated or including far more bundled reasources than the PPTX files.  For a simple 7 slide text-only file the PPTX was 77k and the PPT was 1,421k.  That is a huge difference.  It most likely is because of the background, or fonts in the design being bundled in the PPT and not in the PPTX.  But, does that mean the PPTX can break on a machine without that design?  Does Office know what designs/fonts/backgrouns are included with Office and bundle the rest?  This seems like an oportunity for testing to me.
     
    Note that the machine this was working on is far from anemic.  It is a 4 core Xeon 2.8Ghz system with 6GB of ram and 1TB of disk and a Quadro 4500 GPU with 512MB of VRAM.  I would expect even a beta to do well on this hardware.  The machine is running Windows x64.
    May 25

    Vista Beta 2

    There appears to be some debate on the user experience for Vista Beta 2.  In my case the install went smoothly and the default display driver appears to work and give me access to the full set of resolutions and color depth.  Which is more than I can say for XP.  On the other heand there is a lot of speciallized hardware support like teh hard disk motiion detector that I suspect is not being enabled by default.  The comments about bad user experience have some validity in this area, but not as the comments suggest.  We can not expect all hardware drivers to be delivered on the disk.  So not all wireless chip sets are going to be supported on the initial install.  I would expect the common Intel and AMD chip sets to be supported out of the box.  I have not tried mine yet as I generally use a wired connection.  What I would like to see MS do is to have a central site they host that holds all revistered device drivers, and have Vista look there for any unknown devices.  That alone would improve the "Windows Exiperience" greatly.  I would not need to keep all vendor driver disks, or remember what vendor provided a piece of hardware.  Since windows does not display vendor information on many pieces of unknown hardware, it places a burden on the user to keep track of that stuff.  That is what computers are for.
     
    So while Vista is better than XP it is not yet OS/X.  And I can see an easy solution that would go beyond what either provide today.  Having all hardware drivers available at one location that the OS searches on-line would greatly simplify the hardware management and upkeep of all PCs.
    May 17

    JavaOne 2006

    There is a lot happening at JavaOne this week.  Lots of things being open source.  Lots of things around interop with Microsoft WCP.  Attempts to make Swing look more like the WPF demos.  But, while WPF allows them to be built with markup and Expression Interactive Designer, the Swing demo took 3 days and nights of coding by an expert at Sun.  The Tango technology is a first step at WS-* interop with WCF.  It might match WCF in 1-2 years.  There is also some BPEL and tool work that is looking interesting.  Java EE 5 is final and annotation based deployment and resource injection.  There is even one UML modeling tool vendor here listing SysML at their booth.  They do not do it yet, they just list it.  XMI 2.1 seems to be more available as 2-3 vendors have it now that are at the show.  They claim this is the largest JavaOne yet, but I think that is just marketing.  While the halls are definitely crowded, a large part of that is the lines to get into sessions.  See the item below on this.  The pavilion has a lot less vendors than I have seen yet.  Sun has arranged the floor to make this less obvious, by placing large sun booths and large sponsor booths in many places.  I like the wider isles, but the tone of the conference is definitely different.
     
    In addition to this, my hotel uses motion sensors to limit the use of A/C so I am not getting a good night of sleep each night as the room slowly heats back up while I sleep.  Now I know to ask about this before any future reservations.  I guess I will not be staying at the W San Francisco again.
     
    This year they decided that the solution to complaints about not being able to get into sessions was to make everyone pre-register for each session.  This lets them guarantee the seats that are in the room.  It also means that it takes about 10 min to get people in the room, and there are only 15 minutes between sessions!  This is my 6th JavaOne and this has been the worst experience of all.
     
    There are very few small vendors in the pavilion.  I think the Java market is getting very mature to the point that small vendors have a difficult time entering the market, and justifying the conference.  Sun is saying that Desktop use of Java is where the programmer interest is, but the vendors at the show are all about the enterprise.
    April 27

    Features missing from VS2005

    Now that VS2005 has been out for a while I think it is time to start a list on what should be in the next release.  Most of the day-to-day things are small rather than big features.  They make a big difference because they are used constantly.
     
    1) Selection inside a (, [, <, ", ' to get the entire contents to the matching closing symbol, accounting for nesting of all symbols.  So in '( this is <test arg=")"> and some more )' selecting inside the outer parens will return the full contents not stop at the ) within double quotes.
    2) There needs to be better support for interacting with multiple threads.  In Eclipse the call stack area is a tree control with threads at the top and stack frames enclosed by threads.  Being able to see multiple threads, stop one or all, and debug the ones of interest are much better developed in Eclipse.
    3) Having precanned start configurations.  Again in Eclipse you can configure a launch to run a program with select VM and application arguments, and give it a name.  All such launches can then be on a menu for easily starting one or more executions.  This is great for starting various test cases all in the same project.  It also alows client and server processes to be started simply.  I have an application in Java that requires 4 programs be started so they can communicate with each other.  In VS they would need to be different projects, and each started manually.
    4) The VS UI is very modal.  The console disappears when the program exits and takes the stack trace or other debug information with it.  I may have just missed it but found no way to make this visible in the edit mode.  In Eclipse each set of views is configurable and all information can be seen at all times.  ON a 30" monitor I can have everything visible at once in debug or edit "mode" without things moving around on me.
    5) It would be really nice if the class diagram could use common patterns.  I would like to create a property on the diagram with one entry and have it create the field and encapsulating property with properly derived names, rather than having to create the field then manually tell it to enclose the field with a property.  The same goes for properties that are collections.  I would like to tell it to show all collections as associations unless the element type of the collection is a primitive type.  There are lots of other patterns, go look at the Java modeling tools like the Together products.
    6) I would like the option of looking at the file contents as a tree rather than the dropdown list currently used for file and field in the editor.  The designers use a tree for the document outline but the text editor does not show the outline for a file.  XAML in an outline view would help a lot when editing source.
    7) When using intelisense it should show all types in any assembly that has a reference, even if not currently imported into the current file.  If a type is selected that needs an import it should be added as a result of the selection in intelisense.  This allows typing something like FrameworkE followed by ctrl-space and getting the desired type inserted in the file with any required import.  This would make navigating an API like WPF much easier since all names would be visible so long as there were proper references.  This applies to both C# / VB programming and to XAML.
     
    That is enough for now.  I will probably come back from time to time to add to this list.
    April 23

    The design of virtual machines

    There are two classes of virtual machines (for languages) that have fairly different characteristics.  The older design is that for Smalltalk/Self and the newer one is for Java/C#/others.  In the currently in favor design the virtual machine starts life empty.  You must create each and every object that is to exist in that virtual machine, and they all go away when the process ends.  This makes Java and the like more like conventional programming languages.  You start a program, it runs, and then it ends.  In the Smalltalk lineage the virtual machine starts life with what ever objects existed at the time the "image' was created.  This makes it more like a database.
     
    In the Java world application start-up time is proportional to the number of objects you need to create to present the user interface to the user.  This is why the Eclipse system for example uses configuration files and very carefully manges what happens in order to present the user interface with as little computation/IO as possible.  In the Smalltalk world all objects are available instantly (modulo disk access time) and start-up time is proportional to the computation/IO to load the persisted data and to recreate any state specific to the new hardware the objects are running on.  For example I have seen Java projects struggle to get start-up times that are 10s of seconds, while most Smalltalk images start in 2-5 seconds.
     
    For creating "client" applications the difference in approach has significance since the user perceives any delay as disruptive, and if it goes past about 250 ms starts to wonder if the application is starting.  At 2 seconds users start to do something assuming that the application is not going to start.  That is why splash screens are so popular.  They reassure users that the application will be starting.  Jef Raskin went so far as to suggest that applications should save a bitmap of the screen on save so the window can be presented immediately rather than a splash screen, then be replaced with the real UI a few seconds later.  Since most users will not even try to take action in the first few seconds this approach might work for many applications.
     
    For large server applications, or some specialized client applications like modeling tools, the number of objects needed to take the first action is quite large.  For example in an enterprise modeling tool for one client we need to have 210k or more objects for application start-up.  What we ended up doing is to use a custom file format that can blast objects into memory as fast as possible and to stage the UI construction so that the first several thousand objects are enough to build the basic controls, then the remaining objects are loaded on demand to finish the UI details.  Before a database can answer a query it must be able to access all the objects in the database.  Since that would take too long all databases build indices that must be loaded instead, along with metadata, and a lot of other objects.  While start-up time for a long running shared database is not all that much of a concern this has been tolerated reasonably well.  But, that solution relies on the database being passive.  Once the database starts to perform inferencing, or have embedded behavior the ability to use indices for start-up will be reduced greatly.  While indices also of course make queries faster, they are no substitute for the actual data when performing complex server-side processing in the database.
     
    There has been some research into providing Java style VMs with Smalltalk style storage, called Orthogonal Persistence, and GemStone has made quite a name for themselves for doing this in a truely scalable transactional way.  There is also research going on into transactional memory for the C# and Java stype VMs, even though it has been in production for 15 years at GemStone.
     
    Another major separator for VMs is how well they use multiple processors.  The Smalltalk lineage never really dealt with multi-processor systems given when they were developed.  The Java and C# VMs do this quite well.  With multi-core systems finding their way even into entry level systems (Mac Mini) it is hard to ignore this issue much longer.  While with dual core systems one core can be left to provide OS functions and responsiveness, email, etc. it will not be long before any single threaded application is seen as a bad investment.
     
    Of course the mainstream VMs have better graphics libraries, and much better technical support and larger user communities.
     
    While it should be a no-brainer to use Java or C# I keep finding myself longing to use the Smalltalk class of language.  For many programmer friendly reasons, for many user friendly reasons, and because there is some real value there that is being ignored by the mainstream camps.  With 64 bit systems being common, and large multi-gigabyte memory not far behind the need to create every object from scratch is such a waste.  The ability to have a large engineering application just start with all the objects in place makes so much sense.  I hope that some form of orthogonal persistence eventually reaches the mainstream.  If it takes 20 years from research to mainstream it should not be that far off.
    April 22

    There are only people problems

    As my boss remarked recently: "All problems are people problems".
     
    Even things that appear to be "technical" problems are still people problems.  There are problems where the team does not have the experience to resolve the problem.  There are problems where a framework does not have the features you want (their programmers did not anticipate, or yours did not).
     
    As said in Short Circut about computers: "They just run programs".  And programs of course come from people.  So there really is no such thing as a "technical manager".  All managers are people managers.  The job is always about making tradeoffs, keeping the team motivated, and allocating resources to acheive the goals of the team. Every individual is also a manager of at least themselves, and must perform all the tasks of a manager in balancing their own work load, motivation, and allocation of time.
     
    This has been even more apparent of late to me.  I have so many irons in the fire that I am not making good progress on too many of them, and that hurts morale.  My main job I have been prioritizing and making good progress on, which is fitting.  But, the other jobs that are on the sides have been suffering.  This is not quite the same as randomization where priorities change all the time, but related.  In this case I have too many things allocated to myself to do them well.  And, for me doing things well is a part of my motivation.  So I need to back off on the tasks I assign to myself for the time being and make visible progress on a select few to recharge my batteries.
    February 25

    The Semantic Web

    A friend suggested that I look at what is happening with the Semantic Web, OWL, RDF, etc.  While I have been aware of its existence and the general domain it was in, I had not looked at it in detail or thought about what it could mean or provide.  After looking into it a bit more tonight, I have the following observations.
     
    1) RDF provides the minimum structure required to represent information.  This adds the minimum semantic overhead to the raw data collection or representation, and provides the greatest flexibility in using the data.
     
    2) While RDF can represent any information the same is not true of other representations.  For example RDF can represent ownership, characterization, properties, etc just as XML might, or as an RDBMS might, but without the structure required of those formats.  As such it also does less to validate the data.  In particular the set of relations between terms is not bounded, and the set of terms has no unique defining relation.  So there is nothing in RDF that would detect a typo or validate that two URIs used should be the same that are not entered identically.  Unlike most other representations you can explicitly define equivalence, and languages represented in RDF can impose more validation.
     
    3) When an inference engine is added is where RDF and related technologies gain their real power.  With conferencing things do not need to be exact matches, and semantics do not need to be uniquely defined.  Any two inferencing engines that work on RDF will yield the same conclusions from the same facts, even if they do not have specific knowledge of the domain.  In most languages there are all kines of predefined semantics that are buried in the language specification that require specific coding on the part of a processor to understand.  For example only C# compilers know that "delegate void fred(int count)" means to create a new type that references a function taking one integer argument and yielding no result.  In RDF there would be some set of tuples that contain the raw relationships (a type referencing a function, a function that accepts an argument, an argument that is typed as integer), and while the terms for those relations may not be universal, and not all programs will know what to do with such a type definition, all tools will be able to traverse those relationships.  All inferencing engines can answer the function when queried about all functions with integer arguments.  Al inferencing engines can answer about all types that reference a function.  The simplicity of the representation is what yields the power.  Just as the relational model produced value because of the structure and limited inferencing defined by joins and other relational operators, RDF produces a representation model that when combined with full inferencing will allow an unbounded set of operators and value.
     
    I would predict that just as relational systems became functional and workable with 32 bit systems, semantic web and inferencing systems will become viable with 64 bit systems.  The representation is not as efficient as relational for many things, just as relational was not as efficient as hierarchical.  But, like relational the less efficient representation adds flexibility to use the information from multiple directions to perform reasoning on data not necessarily collected together.  The next Oracle is going to come from the semantic web domain.
    February 11

    Windows in consumer electronics

    There are several examples of Microsoft attempting to use Windows in a consumer electronics market.  Smart phones, Media Center edition, and PDAs all use windows (or mobile edition) based products.  While Windows adds flexibility it has several characteristics that make it totally unsuitable for consumer electronics:
     
    1) Boot time is way too long.  When I turn on a device is should just be "on".  My phone takes more than a minute to boot.  This is incredibly frustrating.  Until there is a warm start that has no drain on batteries this will continue to be an issue.
     
    2) Windows is far too fragile.  It is too easy to install components that are not compatible, that conflict with each other, that damage each other when installed or uninstalled.  Microsoft needs to invest in more virtual architecture for Windows to be stable enough to compete in consumer electronics.  Given a 20 year old code base this is not going to happen over night.  But, 90% could be solved by Microsoft with a few simple changes.
     
    My recommendation (not that anyone cares) are the following:
     
    1) Every time a product is installed capture all registry changes and file changes and place them in a private storage area attached to that application.  Then present to that application a virtual view of the registry and file system (for those areas the install created files).  This may be more impactful than LUA but equally important.  It should be possible to remove an application and all impact on the system by deleting one directory (behind the scenes the virtual views would then be updated by the system).  This could be built on the search indexing done in Vista.  Registry entries could be in files local to the application, and appear part of the registry by looking in the index for all such files).
     
    2) For consumer electronics the OS needs to be in ROM.  There needs to be a hardware reset that does not take 2 days of reformatting, reinstalling, etc.  The OS could be in ROM, patches installed like applications, and all applications each in their folders, all virtualized into a view very similar to what is there today (for backward compatibility).  Then applications would need to indicate any other applications they wish to allow into their virtual view.  This architecture also mean that "installing" an application can be as easy as dragging a folder, and dragging the data.  Then the system detects the executable content, and creates with the user's approval a virtual environment for that executable.  This makes the system far less fragile, easier to repair, and easier for users to relate to and understand, which improves trust.
     
    3) If the above 2 steps were taken, then the only way to have executable code run in the system would be the user explicitly supporting the creation of a new virtual environment.  This would greatly improve security.  Any attempt to run code that was not attached to such a virtual view would fail, and the creation of such an environment would be a highly visible and controlled thing.  This would apply to device drivers, patches, everything on the system.
     
    My understanding is that Microsoft is starting to look at dependencies between their components and attempting to start managing this.  This is the first step in heading in the direction above.  Getting it all to work in a compatible way may take a lot of engineering effort.  Without this effort however Microsoft is going to lose the consumer electronics business to other vendors (like Apple) that have better layering, reliability, and security systems in place.  Windows needs internal firewalls between components both for security and reliability.  This would also allow users to reduce the number of critical services that slow boot time.
    February 07

    They only want to do restores

    I often joke that people do not want to do backups they only want to do restores.  Luckily I do know better.  I have been running nightly backups for some time.  I use Backup My PC Delux which offers the option of doing full backups and differential backups.  Differential backups mean you only have one file of deltas to apply to the full backup to get back to where you were.  The differentials will be larger than any one day's worth of changes, but smaller than the set of all daily changes, and much faster to restore from.
     
    This past weekend I was defragmenting my disk with a trial version of Diskeeper 10 and had a major data loss.  I do not know if Diskeeper was the cause or just one of those Windows moments.  Windows has so many processes running these days that it is hard to locate any cause.  All I know is that after a check disk I had several hundred missing files, and most of my applications did not run.
     
    After about a day of playing with restore options and trying various strategies to do partial restores so as to keep the OS parts running while performing the restore, I appear to have a working machine again.  I am not sure the Registry is fully back to snuff, but then it probably had problems before.
     
    So I can get work done again, and put off the rebuild of my machine until later in the year.  I might even make 12 months before wiping the machine and starting over.  I am sure I will not make it to the Vista timeframe.  I wonder if Vista LUA will help here?  My Mac systems have never required a rebuild just to keep them functional and go years between even a clean OS install.  Here is hoping that the Vista transactional file system improves reliability of the file system.
    January 14

    Debugging Wish List

    I often find myself wishing for a debugging tool that focuses more on macro behavior than micro behavior.
     
    The traditional debugging tool allows the user to stop code, look at variables, single step, etc.  That is micro behavior.  That can be useful for coding errors, or for detecting when a bad condition is found, but often comes too late to fix.
     
    Another class of debuggers has been seen that focuses more on state changes in the system.  The one I saw demonstrated recorded every object change in a system over time.  This allows for some very interesting debug features.  You can walk backward in time to see when a change was made, what line of code made the change, etc.  This addresses a whole class of issues that the traditional debugger does not.  But, in a large system this may not scale.  I have worked with applications that had 100k objects or more and worked with methods that would change 10% of those on a regular basis.  That requires a lot of storage to record changes over time.  I would like to get my hands on such a debugger and try it out.
     
    The third class of debugger that I have never seen as a product, but often want, and end up cobbling together is one for high level algorithm debugging.  This tool is more for looking at patterns of execution, and limited data values along the way.  While the second type of debugger could probably synthesize what I want from the raw data, that might be a large task.  The idea is to have a log of activity in the system, and be able to expand/collapse and filter behavior to see what is of interest.  The filtering has to occur after the fact.  For example an event occurs that is incorrect, add monitoring calls that help indicate when the event occurs, and when the correct behavior occurs, etc.  Then repeat the issue and look for where the correct and incorrect behaviors deviate.  Or when trolling for performance issues the high level trace can help spot unexpected repititions of logic that should not be required.
    January 10

    Web apps vs. Rich Clients

    Web apps are all the rage these days.  AJAX in particular is getting a lot of attention these days.  There is no denying that for advertising driven applications the broach reach of web apps make sense.
     
    From a technology point of view web apps are nothing new.  They are in fact a retreat to the days of mainframes and dumb terminals.  Fancy terminals for sure, but basically the same.  The pendulum swings to centralized computing when the users do not want to be bothered with the burden of IT management.  It swings to decentralized computing when the users want more control over features, responsiveness, etc.
     
    For whatever reason my connection is running slow today, so all my web usage is painfully slow.  Pages can take 5 minutes to refresh.  I do not know if it is the cable company, the internet, overloaded servers, etc.  When it works it is fine, but as a user the unpredictability is frustrating.  Broadband access is not the same as a local application.  That is why Office will never be replaced with a web page.  For the grandparents it might work, but for business use, it just will not fly.  There are many other information worker applications that will never be web pages, though there may be web based support applications for those desktop applications.
     
    Universal access is far from a given at this time, and access is not enough.  Universal Quality of Service is required for the web to replace desktop applications.  That is not likely to occur within the next decade, as IP based networks do not handle that aspect as well as you would like, and centralized IT systems always make cost benefit trade-offs that favor cost over responsiveness.

    New Macs are out

    Today Apple announced the first of their Intel based Macs.  There is a new iMac that is 2x faster with the Core Duo than the old G5, and a new MacBook Pro that replaces the PowerBook line.
     
    I configured a MacBook Pro vs. a Dell Inspiron E1705 (their Core Duo offering).  The Apple came out $300 cheaper (because of the price difference in Office vs. iWork, and Windows vs. OS/X?).  So there does not appear to be a tax on the Intel based Apple line for OS/X, but a discount.  This is surprising and highly welcome.  This should allow Apple to double or more their market share as soon as someone gets Windows running on these machines.  After all who would not buy Apple hardware at prices below Dell?  Apple support is better, you can go to the stores or use the web, and the hardware look a lot better, and it runs OS/X too!!!
     
    The systems I configured had the 1.8Ghz duo, 2GB of ram, basic office software, 100GB 7200rpm disk, and 3yr support.  The cost of support was about the same so that can be ignored.  Dell charges for the better battery, and Office Small Business is not quite comparable to iWork, but as close as you can configure it.
     
    I predict very interesting times ahead, as soon as someone figures out how to dual boot, or even use Intel virtualization to run both at the same time.  The hardware is due out in February so we should know soon.  This is going to be a very interesting year!
    January 08

    Windows and Layering

    I just watched the Channel 9 video about the architecture of Vista.  In the video they discuss the fact that until now (20 years into Windows) there was no effective layering of the operating system.  There are low level parts that depend on executables in the Shell!  They have circular dependencies even.  In short there was no attempt to manage the layering or dependencies within the system.  This explains SOOOO much about how windows operates, and implies even more.  Without this type of basic Systems Engineering I can well understand how windows suffers the way it does from security to robustness.
     
    They also indicated that in Vista they examined how device drivers impacted things like hibernate and power management.  Apparently before Vista it was an opt-in type arrangement.  It took work for the device driver to work well with power management.  So of course most of them do the wrong thing.  In Vista the default is to do the right thing, and device drivers must do work to deal with the non-default case.  In particular when the user closes the lid in Vista a device driver may not say "oh no keep the laptop at full power by all means".  They are given fair warning, but the power IS going off.
     
    It looks like there will be so much under the hood improvements in Vista that the main challenge for MS will be to educate the public/companies on the value of moving to Vista.  The eye candy will not convince that many people, but there appear to be some long overdue but important usability and functional improvements that may well be worth the cost of admission.
    January 04

    C# / WPF MVP Award

    I received the notification of receiving a Microsoft MVP for C# / WPF.  I guess this means I have been active enough in the community to be recognized.  This is great.  Mostly this is great in confirming the Microsoft culture is willing to value those that make a technical contribution to the community, even when they are from a small company.  The people I met at PDC and have corresponded with on the newsgroups and forums have been great.  I look forward to the next year having more involvement and more fun.  With the likely release of WPF and all the rest of Vista this year, I hope to be very busy and engaged with Microsoft technology this year.
    December 18

    The code fixed itself (oh right)

    How many times has the code just fixed itself?  my WCF application was failing reliably last night when trying to send messages to a PeerChannel on a background thread.  This morning I removed the background thread call and replaced it with direct execution of the logic being sent to the background thread (I love delegates).  This was a 3 line change.  Comment out placing the delegate in a Queue and instead invoke it directly.  The software starts working.  Reverse this to again place the delegate back on the queue, and it still works.  ARGGGGGG.  I hate that.  Software does NOT fix itself.  The only other change I made was to place an exception try/catch block around the invocation of the delegate within the background thread.  That could in theory fix a problem where an exception in one delegate stops the others from being executed.  The problem is that that exception branch is never taken (breakpoint and console output never hit).  So some condition present last night is not present this morning.  Those types of bugs/failures are the hardest to nail down as it may not repeat itself before the product is done.  Hopefully it is something in the beta code that MS will fix, otherwise I foresee service calls in my future.
    December 17

    Basic rule of computer science

    I was reminded tonight of a basic rule of computer science: "Once a program does something never get rid of that version."  This can be in the form of a CM system for tracking versions, or a simple copy of the development environment.  Having a baseline that is known to work in certain ways is invaluable.
     
    The specific case currently is some code using WCF for peer to peer communications.  I have an older version (about 1 week old at this time) that was known to work.  I saved it away in case I broke the application in some basic way while making a structural change.  It turns out I did just that, but it took a while to remember I had the copy for reference.  It is so easy to have tunnel vision and keep focusing on the current code which "almost" works.  I am trying to move most of the transmission side of my code to a background thread to keep the UI responsive.  In the process of doing this the application does not even connect itself properly to the peer to peer network.  Only by rerunning the older saved version did I prove that the error must be in the new code changes, not some change in the environment, configuration, or what not.  Then I realized I could make a simple change to the code that queues up work for the background thread, and execute the work in-line there.  Now I have effectively removed the changes I made to use a background thread, and magically it all works again.  So it is even more obvious that the new changes are not working, and most likely some timing related issue is at work, or something sent to the background thread is either mangled or being dropped altogether.
     
    So, having a stable baseline to compare with will allow me to resolve this in a few hours rather than much longer of beating my head against the wall.  Part of the problem currently is that there is so much code that is in CTP state.  This makes it far too easy to question that code.  Now I have again reasserted that as usual the problem is my code.
    December 13

    Languge Tools and Modeling Tools

    Martin Fowler [1] has an article on Language Workbenches that relates to how he sees the idea of custom languages being applied in the near future.  The idea behind several efforts is to allow custom languages to be developed for more specialized purposes.  So there can be a "language" for defining file formats, and another "languge" for defining mapping of objects to a database, or what ever.  The languages can be more real world domain focused as well, such as a language for representing financial derivitive relationships, or one for representing the bill of matierial of a product, or the medical records process of a patient in a clinic.
     
    One of the key points he makes is that these new approaches are looking at the representation of programms differently.  Rather than taking in text and generating a binary executable, they have a semantic model of the language and allow the user to edit the concrete projection of that semantic into a text form.  This allows the tool to do things like refactoring, present context sensitive help, detect compile errors, etc.  The tool becomse smarter to make the user experience better.
     
    This was reminicent of the Smalltalk environments where the tool uses the compiled objects for much of its processing, rather than text input.  Only the current method or definition was in text form, the rest was in the language level semantics.  This enabled things that are increasingly available like finding all implementors of a method or all senders of a method.
     
    Most modeling tools take a similar approach in representing the "language" as objects in the model rather than some flat textual representation.  The difference is that the modeling tools require the user to directly manipulate the underlying abstract syntax, rather than providing good tools for translation of that syntax to the concrete syntax familiar to the user.  The concrete syntax for a dependency for example in UML is a directed arrow with <<depends>> as an annotation.  But, in these tools it is not possible to turn a directed arrow into a dependency by simply typing such an annotation.  The directed arrow is created as a certain kind of object, and any annotation is treated as a name or a comment, not as semantically directing to the tool.  This requires the end-user to understand the abstract model of the language, the concrete notation, and the mapping between them to use the tool.  Given a diagram the user must know what manipulations to make to the model to result in the desireed notation change and semantic change.
     
    November 21

    Managing interdependent teams

    I do not envy Microsoft trying to be more transparent with CTP builds, but trying to manage distributed interdependent teams.  Either you spend a lot of time synchronizing the builds to come out at the same time (by definition delaying some of them), you release them on their own schedules (moaning developers), or you always build all your projects together (impacts on each team by changes on each other team).
     
    The Waterfall model that almost noone defends any longer would have all the integration happen at the end, and no two CTP builds would work together (not good).  The iterative development path would have defined integration milestones with independent development between, and only CTP releases at the milestones would have a hope of working (better but not great).  The continous integration people would have all the builds happen together so impacts are found immediately (good for integration, bad for team productivity).
     
    As a consumer of MS technology I would vote for the last of these.  That way all the projects I am trying to integrate would work together.  There could be minimal testing, since a CTP is not expected to be as stable as a beta.  This would pay off as the breaking changes would come in smaller more manageable pieces.  This would work best if the CTP releases were more frequent so any breakage would be shorter lasting.  For example right now it is possible to use the PDC bits for all the projects, or to use the Nov bits for WinFX, FW2.0, LINQ, VS, and IronPython, but not InkAnalysis.  Because of the RTM status of FW2.0 many projects are releasing bits to support that, which has driven a higher level of compatibility than is usually the case when the projects all operate on their own schedules.
     
    With so many different projects in play, the ideal situation is to have all projects integrate their work at all times, with no loss of productivity due to broken builds.  The current isolated releases seems to be designed to limit the chrun in the project developers, at the cost of incompatible builds for outside developers.  The question is whether it really does that.  Going to a more frequent CTP scheduile like Sun JDK 6.0, or Eclipse milestone builds, would provide more options for keeping the outside projects current, at lower incremental impact to the projects and outside developers.  Any build that is not usable is only a little out of date from the last one.  If a build does not work, wait 2 weeks.  The problem with the current approach is that one project being out of date forces all the projects to use an older version of everything, and can cause a big delay in integrating new changes.
     
    Integration performed at the time of development costs much less than integration performed well after the fact.  Any system that forces old code to be used is pushing integration out in time, which has a high cost.  This is for MS and outside developers.