March 21st, 2008
It’s been tough doing development in Visual Studio 2008 without ReSharper for the last several months, but as much as I enjoy ReSharper, C# 3.0 trumps it. I’ve occasionally installed the Nightly Builds of ReSharper 4.0, but the sea of red around my LINQ code always resulted in the install not lasting very long. Luckily, the most recent “works here” nightly build of ReSharper 4.0 (build 755) looks pretty usable. The only notable issue I’ve found is that it doesn’t like non-trivial LINQ queries inside of static methods, which is a pain but perhaps not a showstopper.
Speaking of LINQ, Brian Stoker has a nice introduction to WPF Databinding with LINQ to SQL over on The Code Project. I’ve been meaning to learn more about this for a while and Brian’s article did a great job of introducing enough information to get something up and running without being overwhelming.
Posted in dotnet | 2 Comments »
March 20th, 2008
Flex Builder 3 includes improved support for web services, but the process of getting it to consume a WCF service was still a bit trickier than expected. Here are a few pointers:
- Flex only supports up through SOAP 1.1, so doing a web service import fails for the defaults Visual Studio uses. To correct this, modify the WCF service to use basicHttpBinding. Pete Brown has an example on how to do this over in his blog.
- The “Import Web Service” wizard doesn’t provide any pointers after it runs on how to use the strongly typed client it generates, but it’s actually pretty straightforward. Check out Build SOAP Clients with Flex Builder 3 over on FlexLive.net. There’s also some good sample code in the comments.
With the above I was able to get a sample WCF service that returns an array of strings working correctly with Flex. I’ll post a followup later with my experiences with more complicated objects—that’s where things have broken down in my experience with SOAP interop in the past. However, supposedly Flex 3’s new support is based on Apache Axis which is pretty well regarded, so fingers crossed.
Posted in general | 1 Comment »
November 12th, 2007
Google has made the Android SDK publicly available. A few first impressions:
- Android development is Java based and is similar to the method used to develop for the Sidekick: Compiled Java classes are run through a tool that translates them to a custom VM (Android’s Davlik VM in this case).
- A good portion of the base Java libraries are included. I’m especially happy to see the excellent java.util.concurrent API is standard. The Apache Commons library is standard as well, which is nice to see.
- There is rich media support available (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF). With Apple, Adobe, and Google all building on H.264, VC-1 is becoming less and less attractive.
- I’ve suspected that Android would include the Java 2D API, since it’s been rumored to be based on the Skia engine that Google purchased. While the engine may be based on Skia, the API is definitely not Java 2D. The 2D library is called SGL, and is documented in the android.graphics package.
- OpenGL ES is standard, but hardware 3D acceleration is not.
- Like Adobe’s AIR, SQL Lite is included for structured data storage.
- Android’s web browser is based on the Webkit engine used in Apple’s Safari browser.
Posted in general | 1 Comment »
October 29th, 2007
- I’ve run every modern version of Windows since NT 3.51 (which ran great including OpenGL 3D graphics on a 90Mhz Pentium with 16 megabytes of RAM believe it or not) but unless something changes radically, I’ll be skipping Vista from now on. I ran it at home for over two months trying to get used to it, but finally I got frustrated enough that I decided it was worth losing an entire evening to “downgrade” back to Windows XP and I couldn’t be happier. I still prefer Windows XP to Linux on the desktop, but I’d choose the latest Ubuntu Linux over Vista in a heartbeat.
- If you’re interested in functional programming, definitely check out Scala. It has a nice pragmatic feel to it, a friendly & active community, and can easily access the massive amount of JVM libraries. There is also a .NET version in the works as well. There’s also a nice plugin for Eclipse being worked on. There’s a great introductory article available over at Artima that I highly recommend checking out.
Posted in general | No Comments »
June 22nd, 2007
- For RSS/Atom parsing with .NET, I’ve quickly become a fan of the parser in RSS Bandit. Download the source via CVS and compile the NewsComponents project as its own DLL. Create a RssParser object, then call
the GetItemsForFeed method with the desired URL. This returns an ArrayList of NewsItems for that feed with information for each item.
Posted in general | 1 Comment »
May 10th, 2007
I’ve been trying to wrap my head around WPF databinding tonight. It turns out Don Box wrote a post on the subject this evening. Due to the power of RSS and news aggregators, I’m benefiting from his post on the same night he wrote it.
Having this happen reminds me of Peter Drayton’s post about blogging and how the technologies around it enabe a “Topic-Oriented Web of Smart People”.
Posted in general | No Comments »
April 22nd, 2007
I’ve been experimenting with Flex 2, Adobe’s Rich Internet Application library built on Flash 9 over the last few months and am impressed. For a very long time Flash was developer unfriendly. That has changed. Flex Builder is a respectable IDE, and Actionscript 3 is based on JavaScript 2 which feels very similar to developing in Java/C#. It’s even nicer in some ways. You can use dynamic typing for prototyping and then switch to static typing when you want compile-time checking. Adobe has also released the Flex SDK, so you can also develop Flex applications for free.
For me, the big technical downside to Flash based applications is that like a Java Applet your application is wrapped in a binary object that is embedded into the web page. That means that search engines can’t easily index it, and as a user you run into weird issues where keys that normally work in web pages don’t work when you’re using a Flex application. The whole experience is somewhat like viewing a PDF on a web page—it works okay but feels slightly off.
Silverlight, Microsoft’s competitor to Flash, is more web browser friendly. It uses XAML, an XML-based format, for describing the user interface and leverages the browser’s JavaScript engine for programming. Instead of binary embedding, it’s all text, which means you can write Silverlight applications in any text editor or even generate them dynamically, and have the resulting page indexed more easily by search engines. From a technical standpoint Silverlight is currently inferior to Flex, especially after dropping CLR support for 1.0, but overall I really like the vision of Silverlight.
Rich Internet Applications are the future, and the battle is on for the platform they will be built with. If the history of cooperation between web browser vendors is any indication, Ajax is unlikely to evolve quickly enough to stay competitive with Silverlight and Flex. Unfortunately for Microsoft, the use of Flash by sites like Youtube and MySpace means that 84.3% of browsers already have a runtime installed that supports Flex 2. If I had to make a bet right now, my money would definitely go on Flex.
Ashish Shetty, a Program Manager at Microsoft recently asked for candid impressions of Silverlight. What I’d like more than anything else from Silverlight is for it to become a non-proprietary alternative to Flash. Microsoft has a real opportunity here:
- Release the Silverlight specification as a open patent-free standard
- Release a Silverlight implementation (minus the multimedia codecs) under the Microsoft Permissive License.
This would be a radical departure for the company and I don’t see it happening. But opening Silverlight would likely fulfill Bill Gates’ vision of seeing Silverlight technology ‘absolutely everywhere’.
Posted in flash, flex, general, programming, silverlight | 1 Comment »
January 17th, 2006
I’ve been tagged by Dave! for the four meme. It would be interesting to see a navigable browser of this meme from its start point.
Interesting coincidence: I got tagged just a couple of hours after finishing Mark Pesce’s interesting viewpoint on the implications of global connectedness.
Four Jobs:
- Software Engineer
- Adjunct Instructor
- Writer
- Chief Software Architect
Four Movies I Could Watch Over and Over:
- True Romance
- Existenz
- They Live
- Fight Club
Four Places I’ve Lived:
- Chicago, IL
- Bloomington, IN
- Richmond, CA
- Mishawaka,IN
Four TV Shows I’d Love to Watch
- Lost
- Charlie Rose
- Good Eats
- The Daily Show
Four Places I’ve been on Vacation:
- Las Vegas
- Portland
- London
- Amsterdam
Four Websites You Visit Daily:
Four of My Favorite Foods:
- Peanut Butter
- Yogurt
- Cheese
- Steak
Four Places I’d Rather Be:
- Marathon, FL
- French Rivera
- Amsterdam
- London
Four Albums I Can’t Live Without:
- The Beatles, Revolver
- PWEI, This Is The Day…This Is The Hour… This Is This
- Gary Numan, Premier Hits
- The Kleptones, A Night at the Hip-Hopera
Four People to Tag:
Posted in general | No Comments »
December 8th, 2005
If you find that a Managed DirectX application you’re developing is taking a very long time to shut down, make sure that you’re disposing all the Vertex Buffers (and other pooled device resources) in the reverse order that you created them.
I’ve been working with Managed DirectX seriously for about a week now and I’m pretty impressed so far. There are a few gotchas I’ve run into like the above, but for the most part it’s been easy to get up to speed. It’s actually more similar to OpenGL than I expected.
Posted in dotnet, managed_directx | 1 Comment »
August 12th, 2005
I’m happy to announce that a new release of Tachy is now available. The big news for this release is that Tachy now includes debugging support developed by Peter de Laat, including an alpha version of his Visual Studio .NET 2003 Add-in for Tachy. Thanks Peter! Click on the thumbnail below to see a screenshot of the Add-in at work:

Peter has generously released his changes and Visual Studio.NET Add-in under the same BSD license as the rest of Tachy. For more information on the new Add-in, take a look at Peter’s “readme.txt” file in the ‘TachySource/TachyExtension’ directory. A sample that uses the Add-in is available in the ‘TachyExamples/Example2DotnetClasses’ directory.
The new release can be found on the Tachy page or downloaded directly here.
Posted in dotnet, scheme, software | No Comments »
April 27th, 2005
Edsger Dijkstra’s Three Golden Rules for Successful Scientific Research [via RGrig’s blog]
- Raise your quality standards as high as you can live with, avoid wasting your time on routine problems, and always try to work as closely as possible at the boundary of your abilities. Do this, because it is the only way of discovering how that boundary should be moved forward.
- We all like our work to be socially relevant and scientifically sound. If we can find a topic satisfying both desires, we are lucky; if the two targets are in conflict with each other, let the requirement of scientific soundness prevail.
- Never tackle a problem of which you can be pretty sure that (now or in the near future) it will be tackled by others who are, in relation to that problem, at least as competent and well-equipped as you.
Posted in programming, research | No Comments »
April 23rd, 2005
- Continuing along the computational aspect of nature meme, the sample chapter from Rucker’s upcoming The Lifebox, the Seashell, and the Soul is quite intriguing. His CAPOW continuous-valued cellular automata software looks interesting as well.
Posted in nks, opengl, programming | No Comments »
April 20th, 2005
A new release of Tachy is now available. This release includes the following changes:
- Separated the Tachy interpreter into a DLL to make it more easy to embed
- Visual Studio.Net 2003 project now included
- Let, letrec, and, or, cond special forms now supported
- Added preliminary macro system (for example of use see implementation of above special forms in init.ss)
- Define special form now supports creation of functions without explicit lambda (a form used extensively in SICP)
- Many more standard R5RS library functions now available
Posted in dotnet, scheme, software | No Comments »
March 30th, 2005
André Pang is surprised that programmers use the default monospace fonts (like Courier) on their OS to edit their code, and as an alternative listed several alternative monospace fonts for programmers .
I have an even more radical suggestion: ditch monospace fonts for coding entirely and edit in a variable-width font like Verdana or Helvetica. I’ve been coding this way for about 5 years now and won’t use an editor that doesn’t support variable-width fonts, as I almost immediately notice the eyestrain. There’s support for variable-width fonts in moderns IDE’s—Visual Studio.NET has supported it for years(“Fonts and Colors” under the “Environment” option), as has Emacs since version 21 (see the “set-default-font” function).
Pretty much every programmer that has seen me editing in a variable-width font has initially recoiled in horror. “But how do you line things up in your code?”, they ask. Other than code indentation, I rarely need to do that, and for indentation tabs work fine.
Try it for a week or two. Your eyes will thank me.
Posted in fonts, programming | 1 Comment »
February 17th, 2005
- The ProMepis Linux distribution automatically installs a hardware accelerated OpenGL driver on my laptop
- While the GUI is slower and less polished, I can tweak it to my heart’s content.
- While Firefox is slower, it’s getting faster, and via the magic of Debian packages it’s automagically upgraded to the latest version on a regular basis (along with the rest of the software on my system). For example the HTML rendering component in my current Firefox browser is from February 10th, a mere 7 days ago.
- The following software has become crucial to my project work: Objective Caml, Coin3D, Cairo, LablGL, LablGTK2 (with native code & GtkGLArea support), and MPICH
Each can be installed on a Debian Linux system like ProMepis with one line (“apt-get install [packagename]”). Compare that to how long it would take to get them all installed under Windows XP (hint: I’ve spent many hours trying to get just lablgtk2 working right under either Visual Studio or MingW, to no avail)
Posted in linux, windows | 2 Comments »
February 8th, 2005
If you read Paul Graham’s Essays, check out a parody of his writings called Taste For The Web. It’s done so well that it actually took me until halfway through the article to realize it was a parody.
The parody led me to Google Maps, which I hadn’t seen before. It’s rough around the edges, but really nice. Here’s what comes up if you search for all of my remote office locations near my apartment with the query: “starbucks near paulina and chicago, chicago”. Try zooming in and panning around—it’s hands down the nicest interface I’ve seen for maps on the web.
A few quality pieces of media I’ve encountered lately:
And speaking of science, I’d been tempted to subscribe to New Scientist for years but was put off by the subscription price. I finally went ahead and got a subscription for myself for Christmas and am so happy I did. I’ve never looked forward to having a magazine arrive every week before, but I look forward every week to this one.
Posted in general | 2 Comments »
November 18th, 2004
I’ve been immersed in getting a Genetic Programming implementation up and running over the last few weeks. The combination of OCaml’s pattern matching and type inferencing have really come through for me, allowing me to comfortably experiment with alterations to the foundations of the system.
In the process, I’ve read quite a few research papers. CiteSeer has proven very helpful and Google just announced Google Scholar which looks promising.
Genetic Programming is extremely computationally expensive and as a result I’ve been doing quite a bit of CPU profiling lately. OCaml unfortunately doesn’t support profiling on Windows, so I’ve been spending some quality time with Linux. I’ve been surprised by how nice the latest distributions are, particularly the “sarge” release of Debian. In fact, for the first time, I now consider Linux a credible alternative to Windows on the desktop.
Posted in genetic_algorithms, ocaml | 4 Comments »
October 19th, 2004
Growing Up With Lucy: How To Build An Android in 20 Easy Steps arrived today and by page 3 there’s already an inspiring quote to share.
“The Lucy project is really a kind of one-man, miniature moonshot – a broad and audacious endeavor with big prizes to be won, but also high personal stakes and a significant chance of complete failure. Yet moonshots are sometimes the only way: you cannot reach the moon by learning to jump incrementally higher and higher, no matter how impressively rapid your initial progress might be; sometimes you need to take a bold step, stop jumping, and set to work on building a moon rocket”
The author, Steve Grand, was the main programmer of Creatures and also wrote Creation: Life And How To Make It, one of my favorite ALife books.
Speaking of books, I’ve been pretty happy with AI Techniques for Game Programming for getting up to speed with Genetic Algorithms. The logical next step is Genetic Programming, a successor to Genetic Algorithms that evolves computer programs to find solutions to problems. I just ordered a copy of Genetic Programming : An Introduction, which looks promising and will hopefully keep my brain from exploding when I tackle the Koza books.
Posted in alife, genetic_algorithms | No Comments »
October 6th, 2004
Since becoming interested in Artificial Life & computer based simulation several months ago I’ve spent a great deal of time researching Artificial Life & simulation, and a great deal of time programming. But I realized recently that most of that programming has been building foundations to do work with, but very little coding on the actual topic that got me started! So yesterday I put together a simple implementation of Conway’s Game of Life . If you’ve never played around with the Game of Life, I highly recommend giving it a try. My implementation (along with full OCaml source) can be downloaded here. There’s an included binary for Windows, but it should be compilable on any system that OCaml/LablGL works on.
I had a lot of fun programming my Life implementation and it’s neat to see the complex patterns that can be generated from such simple rules. The pattern that’s loaded up when the program runs is one that I found while playing around that surprised me just how interesting the result was (the pattern is just 8 cells in a jagged line, but runs for many generations).
For a much more feature rich version of Life (for Windows) check out Life32. It’s an impressive piece of work.
Posted in alife, ocaml, programming, software | 4 Comments »
September 28th, 2004
As I mentioned previously, I’ve been spending a great deal of time with Objective Caml (OCaml) recently.
Why do I like it?
- Interactive use (like Lisp, Perl, & Python) via the bytecode interpreter (ocaml).
- Compilable to assembly language for a variety of processors (including recent support for Amd64) via the optimizing compiler (ocamlopt).
- Type Inferencing provides the type safety of a language that requires a type definition for each variable (like C#, C++, Pascal, etc.) without (usually) having to declare them manually. So you get the conciseness of languages like Python or PHP without the worries of possible type errors at runtime.
- Pattern Matching is like a case statement with nitrous and supercharger bolted on. See the tutorial below for examples of the neat things you can do with it.
What don’t I like?
- OCaml is so strict about type safety & so focused on performance that there are separate operators for integers and floating point numbers. While I understand the motivation, in practice it really does get in the way when working with numbers (although usually not for other types).
- Getting the command line tools to work correctly for complicated builds (at least under Windows) can be painful.
- There are many fewer libraries available for OCaml than for Python, Perl, or .NET. (However, there is good support for OpenGL under OCaml. Check out LablGL).
Learning OCaml, for C, C , Perl and Java programmers is a great tutorial to get started with. The most pleasant way I’ve found to use OCaml interactively is under emacs with the Tuareg mode. It does very nice syntax coloring and allows the sending of expressions from the editor to the OCaml toplevel one phrase at a time, which is great for interactive development.
Posted in ocaml | 4 Comments »