Monthly Archives: December 2005

and today…contract first (finally!)

As long as I”m in the middle of a gaggle of learning curves (eg advanced ClickOnce deployment, uncommon UI threading issues, and a host of other things I’m dealing with as I port a particular app to VS2005), I added another one today – contract first web services. In addition to porting the application, I am adding in some enhancements that my client has requested. One of them required a new web service. So I thought it was a perfect time to drop everything and learn to do contract first, of course using thinktecture’s WSCF tool (testing out their not yet released VS2005 version). But I’m not just learning how to use their tool. I am such a weenie when it comes to schemas, WSDL, etc. – like many non-plumbers. This process is requiring me to get a little further under the sheets with this stuff, too. One wonders why it takes me so long to finish something. Of course this is not including the hours I had to take out dealing with compatibilty issues between our scanner (Canon LiDE 35) and our new printer (HP Laserjet 1320) and continued research on DVI KVM’s (I think I found what I’m looking for here) and while I was at it ordering a DVD burner (finally) so I can freakin’ install the new Vista bits.

Anyway, back to it!

Don’t Forget: www.acehaid.org

the consultant’s life: living off of a limited resource

:Larry O’Brien, an independent programmer/writer, talks about the limitations on living off of your time. Since you can’t make more time and there is a limit to how much you can charge for your time, you definitely have a limit to how much income you can earn. Larry, I hear ya. I want to work less, not more. But I sure would like to get rid of this mortgage!

Don’t Forget: www.acehaid.org

VS2005 compiler has encountered a problem, do you want to report it?

This seems to happen occasionally when I type into the code while debugging. So I say Cancel, i.e. no, and the question keeps coming up over and over. So if I say “ok” I know I’m in trouble when I get the screen about “large sections of the file may be include”. This always ends in a hang. (No there are no 3rd party add-ins installed). And then I just have to give in and open up task manager and trash it. Or wait for it to finally time out, but then I get the error “The Vbc taks failed unexpectedly”. Well, 10 of those errors, in fact. What a pain. Oh well. I’m sure the fact that I’ve got this wierd application that I am moving from VS2003 to Vs2005 has something to do with it.

I can’t tell exactly what the pattern is, but it is certainly not a random act of nastiness.

Don’t Forget: www.acehaid.org

ClickOnce and Application Data Directories

The application that I am porting to VS2005 has off-line capabilities. In VS2003, after looking at a lot of options, I chose to store the data in the App folder of the All Users area in c:\directory and settings. One reason for this is that it is possible that a laptop will be passed off from one user to another and they need a common area that they can access. The other reason is that occasionally we might need to get at that data manually if there is a problem. This is the main reason why isolated storage was not an option.

I was able to get to this folder with

System.IO.Directory.GetParent(System.Windows.Forms.Application.CommonAppDataPath)

Not so in ClickOnce.

ClickOnce installs apps into a user’s local storage – (Directory and settings/user/local settings/apps). This means that on shared computers, there may be multiple copies of the application. I don’t like that and will see if there is a way around it since I am manually generating manifest files anyway, but I can live with it.

It also means that the above method returns the data directory defined by ClickOnce, which is inside of this install (rather, in the same parent folder). Not just that, but there will be a different one for each update of the application. This is bad bad bad (for my application).

You can read more about this here in the docs, online.

Even though the LocalSettings  folder is a safe folder as far as CAS is concerned, I don’t like the idea of hardcoding that file path (or making it a resource). But at this point, I think it’s going to be the solution. Bah!

Don’t Forget: www.acehaid.org

Holy Moly – 4000+ spam referrals overnight

My blog site is really under attack! I thought I had it at bay after implementing AngryPets’ ReverseDos and not seeing any more of these since yesterday.  ReverseDOS is doing an amazing job, but I do have to keep up with adding the domains into the config file. Only about 4 would have done the trick here. It’s amazing. Clearly there is a list of a number of my blog posts somewhere and they just run that list against their own list of urls that they want linkbacks to and keep republishing some page with that list on there or something. It’s becoming a full time job and I’m getting more than annoyed. Sadly I have “trackback services” turned off in my dasblog settings, but all of this stuff still shows up on the post’s pages.



Don’t Forget: www.acehaid.org

Referral Spam for Christmas

I got a ton of referral spam yesterday, then left the house at about 2pm. When I came home our power was out and I didn’t boot up my computer until this morning.

Outlook has been downloading email for over an hour! It’s all referral spam on my blog. Thousands upon thousands. I have never seen anything like it.

Quite insane.

Don’t Forget: www.acehaid.org

FoxPro DOS (yes, DOS) and those new-fangled printers

I have an ancient FoxPro DOS app that churns out reports in a way that can’t be done too easily (not worth a rewrite) in Windows. It used to print these on an HP LaserJet II (back in the days when we listened to music on those big flat round discs with a needle) and has been printed on a LaserJet 4Si for about 12 years or so. I just got a sweet little LaserJet 1320t and expected all of this printing (which is done in PCL) to continue to work. But it didn’t – at least not without some sweat and tears – and I had a few lessons to learn.

1) The new printers are very special and create their own ports on Windows for printing. I finally realized that to print from DOS at all, whether a print command from the DOS prompt or from within FoxPro, I needed to change that to LPT1. (And have to remember to switch back for all of my other printing.)

2) Somehow my application was communicating enough to the printer by saying “legal paper, please” that the printer would find the right bin, even if I moved the legal tray to the upper bin or the lower bin. With the new printer, I needed to explicitly send the PCL code for legal paper and lower bin (esc&l3A  and esc&l4H)

3) My reports were printing out based on 117 lines per page (legal) . I could no longer get that to work (two hours was enough time spent on that problem, wouldn’t you say?). So I had to accept sticking with 102 lines and 8 lines per inch. I literally print this report using line and column #s for positioning, so this is a big deal for me. Of the 400 reports that get printed (one per entity), not too many of them needed that full length, so I will just have to keep an eye out for those and make sure the two page functionality I have built into this program works properly.

Hopefully this will help some other dinosaur who is moving partially to the modern ages (funny that I have one foot in the dark ages and the other dipping into the bleeding edge with the rest of my work). As long as Raymond Chen and team continue to allow me to use this reporting tool on Windows XP and beyond, I have no incentive to try to duplicate the process in windows.

Don’t Forget: www.acehaid.org

Talking about ADO.NET on ACADEMICDOTNET.com

Earlier this month, Matt Cassell interviewed me (with great questions) for his podcast show, www.AcademicdotNET.com that is aimed at highschool programmers.

Matt is himself in high school, but at 15, has still been programming a lot longer than many of us!

My interview was #4. The first was Ted Neward, and he is about to push up #5, with Regional Director Barry Gervin.

It was a lot of fun to do the interview (and he even taught me how to use skype). What impressed me was that he had very specific questions so that he could be sure that the discussion was at the proper level for his target audience. I think that anyone at any age who is new to programming and new to .NET will find these podcasts very helpful.

Don’t Forget: www.acehaid.org