Sci fi character

I was going to take that stupid sci fi character quiz that many people are doing, but it didn’t work for me in Opera. So I say, “forgit dat”.

this quiz sux.

If I were a sci fi character, I would be Salvor Hardin. He probably isn’t much like be, but I really enjoyed reading him.

If you don’t know, Salvor Hardin is a character from Issac Asimov’s Foundation.

CYCAS fills a need

I need to get my dad to try CYCAS and see if his old autocad files will open in CYCAS in Linux.

Compatibility with DXF (and DWG?) has been a hold up for converting his desktop to Linux for years. He is still running a version of Windows 98 that was actually installed in 1998. Its the must cluttered and unstable windows desktop I’ve ever known.

Ubuntu + CYCAS might just be the ticket.

Things I thought I’d never need to know about COM

I did some VERY basic COM programming in C and C++ in 1999. It was so basic it really was just a few function calls exposed so that they could be called from Visual Basic. I initially struggled with Variant. Then I learned to love the elegance of the giant union. I hated that there were so many type of strings. I had done MFC, but this was ATL. And of course I was wrapping up ONC (yes not DCE!) RPC calls, so I eventually wanted char*. Long story short, I learned a little bit about COM, and I never used it again. I remember through the process, reading about COM threading models and the single apartment model and the multi apartment model. Of course usually these topics just got in the way of what I wanted, which was the simple VB-> C -> ONC RPC-> network cloud -> omg calling function on unix, which I wanted.

(I still love that concept. It was pretty easy to call unix from windows or windows from unix, using ONC RPC. Yes, ONC RPC can be a pain, but it works. I don’t recall where I found my ONC RPC toolkit for win32, and yes it was very much a kludge.)

Here I am years later, and I actually found that Threading model stuff useful!

After reading a series of news group posts…
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/7ee0a48dde3d4188/bf6f1ac9c25190ad?q=QueryInterface+for+interface++failed.+service+permissions+-outlook&rnum=10&hl=en
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/8c313072acb7b8f4/673e7d3c744e452f?q=QueryInterface+++failed&rnum=1&hl=en
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.windowsforms/browse_thread/thread/e40283466a8688c8/f4febade7679f67f?q=stathread&rnum=2&hl=en
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/df6b006cb3bcfaf9/1d204a540064f9a4?q=QueryInterface+++failed+sta&rnum=1&hl=en

I finally realized that, HEY! Maybe that AspExec legacy COM control, that I don’t think we should be using anyway, is expecting an STA model. Even though my VB.NET Windows Service is marked with the STAThread attribute, when I spawn new threads by creating new System.Threading.Thread objects, I should set the ApartmentState property to STA.

The AspExec control expects to be run from legacy ASP. Legacy ASP uses the STA model. ASP.NET can be told to use the STA model by setting ASPCompat attribute of the @Page directive to true. That part is well documented. I have a feeling that if the ASP.NET page or webservice were creating instances of Thread, that those instances would need their ApartmentState property set to STA as well. Spawning threads in ASP.NET Pages or WebServices is probably not very common or even advised.

I was tickled pink when it turned out that this was the issue. All those years ago I had studied COM and thought I would never need that thread model information, but it turns out I used it after all.

Anti-terror from Rocketboom

Links suggested from RocketBoom, but since not everyone is down with video podcasts, I figured I’d post them.

http://www.pfff.co.uk/weblog/ is a first hand account of a survivor of the London subway attacks.

http://www.werenotafraid.com/ is a collection of blog pics saying “We are not afraid!”. A pretty powerful, and sometimes funny, statement to anyone who would try to use terror to instill fear in the general population.

On a site note, I hope Robert and Patrick Scoble keep up the podcast. Patrick is hilarious. The awkward father-son banter is hilarious.

Mathematica? Why not

Roml’s Mathematica post triggered me to think… Why Mathematica?

Octave, Maxima, and R will each do at least 80% of their commercial counterparts, Matlab, Mathematica, and SPSS. It sounds like you purchased Mathematica because you want that specialized 20% which Maxima will not do. I liken this to using any other niche commercial software such as Oracle over Postgresql, or Websphere instead of Jboss.

Would it be possible to get Oracle or Websphere packages into a debian tree? Yes, we are programmers, just about anything is possible. Is this likely to ever occur? No, I don’t think so. Oracle and IBM may claim to embrace open source, but they don’t embrace, nor do they even understand the levels of ease of use and administration which you are suggesting.

My advice: use Maxima. 🙂 It doesn’t do what you want? Add the feature you want, this is the power of open source! Don’t have the time to add said features? Then you are doomed to struggle with the manual installation of commercial software!

Exercise is good, I am not

I am in the worst shape of my life. Too much sitting at the desk at work, and to much sitting at the desk or on the couch at home.

A 45 minute bike ride used to barely make me sweat. Now it feels like a huge workout. I’m going to try to resolve the inactivity.

I almost feel an itch coming on for some code. Dotnet needs a flexible BitTorrent library. NBT started off on that path. I need to see how complete it is. Ipodder is a good piece of software, but I prefer to develop in dotnet and C#, so adding ipodder functionality to RSS Bandit might suit my needs.

Visual Basic.NET color syntax highlighting in Vim

I wish I had added these lines to my vimrc months ago. I’m not sure why they aren’t in vim’s filetypes.vim. My vim is pretty new. Perhaps I should file a feature request?

” Visual Basic.NET
au BufNewFile,BufRead *.vb setf vb

I’m really just using vim as a reader. Color syntax highlighting is nice in a source reader. Of course I wouldn’t have to read that way if work had source control and viewcvs. I think right now we are scoring between a 0-1 on the Joel test. I’d like to get us to 4 or 6 by my 1 year anniversary.

A Clever and Fun 4th of July

Not my 4th of July, but Joe Shaw, Nat Friedman, and their friends did something VERY awesome, clever, and fun, a reenactment of the Scopes Trial.

Hey guys, next time, get it on video and release it under for all to see. Give it a nice license. The world is in need of less restrictively licensed entertainment, and your reenactment sounds like quality entertainment.