Archive for January, 2009

Jan 30 2009

Playing with Blocks: Episode 2

Published by Mark under Features, Programming

When you start to design an application for producing drawings in Silverlight, there are some things you don’t have to worry too much about. You don’t have to come up with definitions for shapes, or figure out a fast way to render them. You don’t have to define a color space, and gradients, and geometries for clipping and filling. You don’t even have to define what a surface is and how shapes interact with it. Windows Presentation Foundation takes care of all of that stuff, and quite nicely too.

What you do have to think about is how to organize and present that capability to the user, and how to connect the user’s intentions to the underlying systems. You need to think about how to do all that in a robust and extensible manner, in an environment that is quite a bit more constrained than the context in which a normal WPF app runs. In other words, you need everything but all the stuff I mentioned above, and that still leaves quite a lot to chew on.

Continue Reading »

No responses yet

Jan 30 2009

Playing with Blocks: Episode 1

Published by Mark under Features, Programming

I’ve decided to write a couple of posts about the design and execution of a Silverlight application I’m working on. If you’re not familiar with Silverlight, here it is in one sentence: Silverlight is a downloadable subset of the WPF containing just enough of the framework to execute specialized WPF applications in a browser window. It’s a competitor to Flash, without doubt, but since I never really went in for doing games and demos in Flash I don’t really think about the positioning. Silverlight lets you animate, and play sounds, and do all that cool stuff that I think of when I think of Flash. But Silverlight also has everything you need to do lightweight, browser-hosted, net-delivered applications. I don’t know if people do many apps in Flash, but that’s the part of Silverlight that gets me excited. If you think about all the datacenter cycles that get spent pushing ASP roundtrips to update the front-end, Silverlight starts to look pretty damn appealing.

Continue Reading »

No responses yet

Jan 28 2009

A Silverlight Gradient Designer

Published by Mark under Programming

One of the projects I’m working on is a drawing program for Silverlight. It needed a gradient editor so that users could define brushes to fill shapes, etc. Last week I wrote about the color picker I developed. This week I’ve added a gradient editor to the ColorTools package. The gradient editor combines a color picker and a visual gradient designer. In order to get all of this working I was forced to create some geometry editing tools that will come in very handy in the drawing application. As soon as I had the gradient editor control finished I used it to created a gradient designer application for Silverlight developers. Gradient Maker is a visual tool for defining gradients that produces cut-and-paste code for brush definitions in XAML, C#, and VB. Give it a try, and let me know what you think. I haven’t yet released a new version of ColorTools including the gradient editor control, because the code needs a little more work and I would like to test it a bit. But I hope to get it out early next week.

No responses yet

Jan 21 2009

Color Tools for Silverlight 2

Published by Mark under Programming

A Silverlight project I am working on required color picker controls – those boxes you find in programs like Paint, Photoshop, and others that allow you to choose a specific RGB color. After doing a little research I wrote two Silverlight user controls, a system color picker that enumerates the available colors from the System.Windows.Media.Colors class properties, and an ‘HSV’ color picker that sports the traditional hue slider, saturation/value box, color swatch, and hex display. You can try out these controls on my ColorTools demo page.

HSV color picker control

I want to credit the excellent examples by Page Brooks in his article on building a Silverlight color picker. Specifically his rather cool tricks for creating the color gradients using XAML, and his implementation of a ported javascript HSV-to-RGB conversion, which I have more or less cribbed in wholesale fashion. To his basic concept I have added a routine for converting from RGB-to-HSV, in order to allow setting the selected color from code. I have also fleshed out the dependency properties for both controls in order to make them useful. Feel free to download and use these controls in your own applications. Links to source and binaries appear below. There is no documentation yet, mostly because I have just installed Vista and haven’t put Sandcastle back on yet, but the controls are very easy to use, and the demo page shows the basic XAML and C# needed.

ColorTools for Silverlight Runtime
ColorTools for Silverlight Source

2 responses so far

Jan 10 2009

The GSearch Lib – Google Searches from .NET and Silverlight

Published by Mark under News, Programming, Technology

In the process of working on GMemory, a Silverlight 2 game I wrote as an exercise a couple of weeks back, I became familiar with Google’s RESTful webservice API. Using this API applications can execute searches and receive results back. The API is not a complete drop-in replacement for the full-blown Google search engine – it can produce at most 64 results (8 items per page over 8 pages), for example – but it is an interesting and useful way to incorporate search results into your applications. Results come back in the form of some nested JSON types, which are easily deserialized into .NET classes once you understand the structure and get the type definitions correct. I had to do that for image searches to make GMemory work, so once that was done I decided to go ahead and implement the rest of the search types as well.

The result is GSearch, a library of classes for searching Google from .NET 3.5 and Silverlight 2 managed code. The library encompases all the supported search types on the current version of the Google API, meaning blogs, books, images, locations, news, patents, video, and web pages. The classes are very easy to use, and you’ll find some examples in the readme files accompanying the runtime packages. The .NET distribution also includes GSearchPad, a WPF example program that will allow you to execute any of the search types with custom arguments and display the results.

GSearch is copyrighted software released under a BSD Permissive license. Feel free to play around with it and use it in your own commercial or noncommercial apps. This is the first release, and there are sure to be some warts left in it. If you find one, or have a question, please feel free to drop a comment here or shoot me an email.

No responses yet

Jan 09 2009

Programming and Production

Published by Mark under Programming

I went down a six hour sinkhole last night on a project I’ve been working on for the last week or so, and that got me thinking about some realities of software development that I believe we have lost sight of. One of them is six hour sinkholes and why they happen. The problem is that we have come to believe that programming is production, when it is not. In production a six-hour failure to be productive is a horrible anomaly. It shouldn’t happen, because production is predictable and well-understood, and proceeds at a linear pace. When that pace is interrupted management is called on the carpet to explain why.

And it is a fair question. Production is quantitative. By the time you start production all the messy qualitative work has been done. Production should not, therefore, be hampered by the unforseen. Of course it often is, but then that unforseen is accounted for, the mechanisms and processes adjusted, and before too long you have a soda canning line running at 5000 cans an hour for years without stopping for anything other than maintenance. The equivalent in our business would be programmers that produce 100 lines of code an hour, every hour, except when they are out to lunch. The idea is as absurd as it sounds.

Why? Because programming is not production. It is also not a commodity, but that’s a lesson for a different time. I mention it only because once you start thinking about programming as production it’s pretty easy to think of it as a commodity. Both views are wrong. In fact, it’s pretty obvious that, as Jack Reeves has said, programming is design. It is a qualitative process that proceeds uncertainly until some level of “good enough” has been reached and the final product can be produced. And where is the production happening? Where do we have a linear and predictable process of converting raw input and specifications into a final product? In the build, of course, and that’s the whole damn problem.

In software our product is “constructed” of symbols, and the definition of those symbols and how they can be used is fully specified before one iota of our product comes into being. Therefore once we design the set of symbols we need, the production process is fast and dirt cheap. As Reeves points out, it’s essentially free. That’s the problem: programming is all design and almost no production. If you’re a manager you can say concretely how many soda cans will be filled in 12 hours, but if you venture the same prediction about a software team’s delivery of features in the same period you’ll be stepping out on a limb. They may run into a six hour sinkhole. Because they are designing, not producing.

Which is not to say that design is an unmanageable activity. Lots of companies manage it. They design to specific goals, over specific timeframes, with hard milestones. But in all of these kinds of environments there is a lot of flexibility with regard to the micro view of progress, rather than the macro. A “design team” sounds like something different than a “programming team” doesn’t it? It sounds like the kind of group you would find working to flexible schedules in a cool, intellectually stimulating environment where good ideas are prized above all else. A “programming team” brings to mind more the image of a hundred young Japanese women hunched over tables in an electronics factory soldering assemblies.

If business understood programming as design, I suspect there would be fewer projects, but better ones, and less inclination to shop coding out to the lowest global bidder. After all, it’s usually the productive piece of the pipeline that gets outsourced, not the creative piece.

No responses yet

3d home architect design suite deluxe 8 download . acd see download . acronis disk director suite 9.0 . acronis true image 10 . acronis true image home 2009 download . adobe acrobat 5 . adobe acrobat 6 download . adobe acrobat 7.0 pro download . adobe acrobat 7.0 professional . adobe acrobat 8 pro . adobe acrobat 8 professional download . adobe acrobat 8 standard . adobe acrobat 8.0 professional download . adobe acrobat 9 download . adobe acrobat 9 pro extended download . adobe acrobat reader 5 . adobe acrobat reader 8 download . adobe after effects 7.0 . adobe after effects cs3 professional . adobe after effects cs4 . adobe after effects download . adobe captivate 3 . adobe contribute cs4 download . adobe creative suite 3 design premium . adobe creative suite 4 . adobe creative suite 4 design premium download . adobe creative suite 4 master collection download . adobe creative suite 4 master collection mac . adobe cs2 master collection . adobe cs3 design premium . adobe cs4 design premium . adobe cs4 download . adobe cs4 master collection download . adobe cs4 master collection mac . adobe cs4 web premium . adobe dreamweaver 8 . adobe dreamweaver cs2 download . adobe dreamweaver cs3 . adobe dreamweaver cs4 download . adobe fireworks cs3 . adobe flash 9 . adobe flash cs2 . adobe flash cs4 professional . adobe flash cs4 professional mac . adobe illustrator cs2 . adobe illustrator cs4 mac download . adobe indesign 2.0 . adobe indesign cs4 download . adobe photoshop 12 download . adobe photoshop 6 . adobe photoshop cs . adobe photoshop cs2 download . adobe photoshop cs3 download . adobe photoshop cs3 extended . adobe photoshop cs4 extended . adobe photoshop cs4 extended mac . adobe premiere 6.5 download . adobe premiere pro cs3 . adobe premiere pro cs4 download . adobe presenter 7 download . apple final cut express 5 download . autodesk 3ds max . autodesk 3ds max 2010 . autodesk autocad 2007 . autodesk autocad 2008 . autodesk autocad 2010 download . autodesk autocad architecture 2009 download . autodesk autocad electrical 2010 download . autodesk autocad inventor lt 2010 . autodesk autocad inventor professional suite 2010 (32 bit) . autodesk autocad inventor professional suite 2010 (64 bit) . autodesk autocad mechanical 2010 . autodesk autosketch 9 . autodesk inventor 2008 . autodesk inventor professional 2009 download . avid media composer 2.8 download . cakewalk sonar 7 producer edition . corel painter 10 . corel painter x download . corel photoimpact x3 download . corel video studio pro x2 download . download 2003 microsoft office . download acronis disk director suite 10 . download adobe acrobat 6.0 professional . download adobe acrobat pro . download adobe acrobat reader 6 . download adobe captivate 2 . download adobe contribute 3 . download adobe creative suite 3 . download adobe cs3 . download adobe cs3 master collection . download adobe cs3 master collection mac . download adobe dreamweaver cs4 mac . download adobe fireworks cs4 . download adobe flash 8 . download adobe flash cs3 professional . download adobe flash cs3 professional mac . download adobe illustrator 9.0 . download adobe illustrator cs3 . download adobe illustrator cs4 . download adobe indesign 4 . download adobe indesign cs . download adobe indesign cs3 . download adobe photoshop 7 . download adobe photoshop 7.0 . download adobe premiere 2.0 . download apple final cut express 4 mac . download apple final cut studio . download autodesk 3d studio max 2009 . download autodesk 3d studio max design 2009 . download autodesk autocad 2009 . download autodesk autocad architecture 2010 . download autodesk mudbox 2009 . download corel draw 11 mac . download corel dvd copy 6 plus . download corel video studio 12 . download dreamweaver 4 . download dreamweaver cs2 . download dreamweaver cs3 . download dreamweaver cs4 . download dreamweaver mx 2004 . download intuit quickbooks 2009 premier . download mcafee total protection 2009 . download microsoft autoroute 2007 europe . download microsoft frontpage 2002 . download microsoft money 2004 . download microsoft money 2007 . download microsoft money 2008 . download microsoft money plus 2008 . download microsoft office 2003 professional . download microsoft office 2004 for mac . download microsoft office 2008 for mac . download microsoft office 2008 mac . download microsoft office 97 . download microsoft office enterprise 2007 . download microsoft office for mac . download microsoft office visio professional 2003 . download microsoft office xp . download microsoft streets and trips 2009 . download microsoft windows vista business (64bit) . download microsoft windows vista home basic with sp2 (32 bit) . download microsoft windows vista home premium with sp2 (32 bit) . download microsoft windows vista home premium with sp2 (64 bit) . download microsoft windows vista ultimate (64bit) . download microsoft works 4.5 . download nero 10 . download nero 2009 . download nero 8 ultra edition . download nero burn . download parallels desktop 4.0 for mac . download pctools spyware doctor 5.5 . download quarkxpress 8 . download roxio creator 2009 ultimate . download roxio creator plus . download sony vegas pro 8 . download steinberg nuendo 3 . download symantec winfax pro 10.0 . download vmware workstation 6.5 ace . download vmware workstation 7 . download window xp professional . download windows 7 release . download windows office xp . download windows vista 64 bit . download windows vista ultimate . download windows xp pro sp2 . download windows xp sp1 . download xilisoft video converter ultimate 5.1 . graphisoft archicad 12 . guitar pro 5 mac download . guitar pro 6 . i.r.i.s. readiris pro 11 download . intuit quicken rental property manager 2009 . macromedia dreamweaver . mathworks matlab r2008a . microsoft autoroute 2008 download . microsoft autoroute europe 2009 download . microsoft autoroute express download . microsoft digital image suite 2006 download . microsoft encarta premium 2007 . microsoft encarta premium 2009 . microsoft frontpage 2.0 . microsoft frontpage 2003 download . microsoft frontpage 2007 . microsoft mappoint 2009 north america download . microsoft money 2005 . microsoft money 2007 home & business . microsoft money 2009 . microsoft money plus download . microsoft money premium . microsoft office 2000 download . microsoft office 2002 . microsoft office 2003 enterprise