I acquire consistently admired to assay adapted brands of swiss fake watches affluence watches. If comparing the above brand, there are replica watches uk not abounding differences you can accretion distant from the above of replica rolex uk the replica. You can accretion some of the best Patek Philippe replica watches and acquire abolishment to rolex replica say added than your architectonics or you could accretion bigger above and a lower replica hublot watches casting and achieve your best easier.

2007 May — Visual Basic Feng Shui

Monthly Archives: May 2007

Web Hosting (or Move your s**t, I wanna put my stuff here!)

2
Filed under Blogging, Misc

Ok, you’ve got a nifty idea for a site, maybe it’s personal stuff, maybe it’s something more involved. You could put it up on that free space your ISP gives you. And then you get to hassle with it every time you have to change ISP’s because Comcast gets bought by TimeWarner, that decides to bail out of your area leaving it to verizon, which…. you get the picture.

Or, you can plunk down a few bucks a year, buy a domain name and then plunk down a few more bucks a month and buy some space on a professional hosting company. That way, the domain is yours and it won’t change just because some bean counters at your ISP decide your city no longer forecasts to good market saturation, or whatever the jargon is. It also means an email address that won’t change just because you ditch cable and switch to Dish Network (say that five times fast!).

There’s a lot of hosting companies out there, and everyone has different requirements and demands as to what a good hosting company consists of. In my case, I wanted a host that would provide a decent amount of space, tons of email support, MS SQL and MySQL options, as well as Access dbs, and full support for .NET and some of the more esoteric web languages out there, like PHP, Ruby, Python, etc. so I could experiment with them, time permitting.

www.1and1.com looked pretty good, the price is definitely right, but they make you choose between Windows hosting, with .NET support and Linux hosting, with all the other languages. Not so good. But their domain registration is excellent and they provide free private DNS records, which is quite nice.

I ended up stumbling upon www.servergrid.com. They support all my requirements for 7.95$ a month, and they use HSphere for dynamic site management, which seems to work pretty good for me. I can host all my domains through one account, and just split my space up between them, which makes managing everything nice and tidy. Granted, I’m only running small sites, testing web apps, etc so I don’t have huge demands, and your mileage may vary.

This site uses dasBlog for its content management. I had it installed, setup and running within an hour on my ServerGrid space (not including the hours and hours I spent coming up with the nifty graphics, layout, CSS and color scheme, but that’s another story!)

I will say this though. I’ve started up support chats at one in the morning with these guys and there’s always someone there that seems to know what they’re doing. Good support goes a long way in my book.

Apophysis and Fractal Art

0
Filed under Apophysis, Fractals, Media

Apophysis is a “fractal flame generator”, and quite simply one of the most fascinating applications I’ve played with in quite some time.

I’m probably a bit late to the scene with fractals, and doing a google search for “apophysis fractals” will yield a literally dizzying array of different images, some absolutely fantastic and some, well, not quite so much.

Still, Apophysis is one of those programs you can sit down with and literally not look up for, say, 3 hours.

I’ve just started to play with some of the concepts and I’m nowhere near the whole post production effects that many are getting into, but I’ve managed to create a few unique and interesting images, none-the-less.

For instance, here’s a thumbnail of one I call Solar Flare:

Solar Flare

 

Check out the rest of them here.

And hopefully, I’ll be posting more as time goes on.

McAfee and Word Automation

4
Filed under Installations, Office

Had an issue today where some automation code (basically VB that instantiates Word, Excel, or PowerPoint objects), started failing inexplicably.

The only thing the user could think of is that he’d just installed the lastest McAfee AntiVirus.

So, I tried a little test, opened Excel, opened the VB editor in it, then entered:

Sub Main
   Dim X as object
   Set x = CreateObject("Word.Application")
End sub

And that failed too!

After a few googles, I came up with this.

Appearently, McAfee includes a feature called HAWK (Hostle Activity Watch Kernel), that monitors things like CreateObject.

And the fun part is that even if you disable McAfee, HAWK still runs in the background. You have to turn it off seperately in the McAfee UI.

Yet another reason to use NOD32.

Office 2007 and RibbonIDs

0
Filed under Office, VB Feng Shui

By now, I suspect the Office 2007 Ribbon is a bit old news.

From a developer’s point of view, it’s relatively easy to customize the ribbon via add-in code, which is really nice. And since there seems to be no dearth of examples on doing so, I won’t be wandering down that path.

For Word, Excel, and PowerPoint, things are pretty straightforward, because, as far as I can tell, there’s only one Ribbon for them.

But in Outlook, things are more complicated. The main Outlook window doesn’t even have a ribbon. But the sole parameter of the main entry callback for customizing the ribbon is:

Public function GetCustomUI(ByVal RibbonID as string) as string

so what are the possible RibbonIDs?

After a good bit of searching, I found the following table in the VSTO3CTPTutorial.doc file that identifies them all:

RibbonID MessageClass
Microsoft.Outlook.Mail.Read IPM.Note.*
Microsoft.Outlook.Mail.Compose IPM.Note.*
Microsoft.Outlook.MeetingRequest.Read IPM.Schedule.Meeting.Request or IPM.Schedule.Meeting.Canceled
Microsoft.Outlook.MeetingRequest.Send IPM.Schedule.Meeting.Request
Microsoft.Outlook.Appointment IPM.Appointment.*
Microsoft.Outlook.Contact IPM.Contact.*
Microsoft.Outlook.Journal IPM.Activity.*
Microsoft.Outlook.Task IPM.Task.* and IPM.TaskRequest.*
Microsoft.Outlook.DistributionList IPM.DistList.*
Microsoft.Outlook.Report IPM.Report.*
Microsoft.Outlook.Resend IPM.Resend.*
Microsoft.Outlook.Response.Read IPM.Schedule.Meeting.Resp.*
Microsoft.Outlook.Response.Compose IPM.Schedule.Meeting.Resp.*
Microsoft.Outlook.Response.CounterPropose IPM.Schedule.Meeting.Resp.*
Microsoft.Outlook.RSS IPM.Post.Rss
Microsoft.Outlook.Post.Read IPM.Post.*
Microsoft.Outlook.Post.Compose IPM.Post.*
Microsoft.Outlook.Sharing.Read IPM.Sharing.*
Microsoft.Outlook.Sharing.Compose IPM.Sharing.*

BTW, for those that are interested, in Word, the RibbonID is always Microsoft.Word.Document

Similiarly, in Excel, it’s Microsoft.Excel.Workbook

and in PowerPoint, it’s Microsoft.PowerPoint.Presentation

I wasn’t able to find that info published anywhere. I suppose it’s technically irrelevant, but still…

Solid Writing

0
Filed under Blogging, VB Feng Shui

It’s tough to write well. Unfortunately, too many people out there don’t realize this.

I realize it. I also realize I don’t write particularly well, but recognizing your problem is always the first step, right?

I just came across a Gar’s Tips on Sucks-Less Writing that lays down 10 rules to tighten up your writing. It’s old news, sure, but there’s good stuff there.

In the end, I suppose the most important concept to osmose is to say enough, and nothing more.

Backup Utilities (O the joy!)

0
Filed under Misc, Office

I’m a bit of a toolhound, both of the physical variety (like screwdrivers, bitstops, routers and mitre saws) and of the more ethereal (clipboard loggers and macro recorders). Tools make the fun things even more fun, and the wretched things not quite so onerous.

And one really onerous thing for me is backups. They’re a pain, and it seems it’s always impossible to find what you need when you need it. I’ve got a pile of QIC-60 and QIC-80 tapes that there’s no way I could restore even if I wanted to (note to self, burn them in the next trash fire…)

Anyway, I went on a search some time ago for a decent backup utility. Something free, or close, that was flexible enough for what I needed, simple enough that I’d actually use it, capable enough to make it worthwhile and fast enough to not get in the way.

I believe my search ended with FileBackPC.

It’s a nifty little app that does a nice job of the “copy to a floppy” type of backup. Well, ok, maybe not a floppy these days, but plug in a 500gb USB2.0 removeable harddrive and this app is fantastic.

The good points:

  • It backs up specified directories, with wildcards and all sorts of file filters
  • It can compress and retain a specified number of “previous versions”
  • You can specify sets of folders in “jobs” that can be run independently
  • You can set jobs to automatically run, either on a schedule or on “an event” (like plugging in that USB harddrive!)
  • It can reconnect to other machines on your network and back up files from the (great for small home offices with a server and several workstations or laptops).
  • It can even run batch files and scripts to automatically execute processes before backing up the results of those processes. For instance, I have an item that uses the windows “backup” utility to create a single backup file of the critical system components and my Exchange server data, then I backup that file automatically using FileBackPC.

Off hand, I can’t even think of any bad points, other than it’s not an open source project.

I think my favorite feature is the backup on an event. I set several jobs up to execute when the X: drive comes online (that’s my backup USB drive). So literally all I do now is plug in the USB drive, wait till it finishes the backup, and then unplug it and file it safely away. Slick. And it’s got a nice reporting facility too, that makes it easy to see if there were any problems (open files, read errors, whatever).

And, since it’s a copy style backup, it’s blindingly easy to find that backup file when you need it. Get a couple of USB drives and be doubly safe.

Backup utilities definitely aren’t my favorite things, but they’re something almost everyone with a PC needs. I know this has probably sounded more like an ad than anything else, but it’s not. I’m not getting paid by the FileBack people. This is one of those utilities that I’ve found so handy, useful and easy to work with, that I just felt like mentioning it.

Map of the World, DNS style

0
Filed under Maps/GIS

Happened upon a pretty nifty map today.

Here’s a sample:

DNSMap

Basically, it’s a regular world map with all the DNS country codes imprinted on it.

Makes a decent wallpaper too, as long as you have a pretty big widescreen monitor.

SQL Express 2005 Command Line

0
Filed under Installations, SQL

We’re switching a major project over to SQL Express 2005 from MSDE 2000, and in the process of doing so, I came to several discoveries.

  • MS Isn’t releasing any MSI Merge Modules for 2005. Why? No idea. Appearently, that great MSI technology that they insist everyone else use isn’t good enough for their own products.
  • With InstallShield anyway, there is no prerequisite support for Express 2005 in IS 11.5 and earlier. You must move to InstallShield 12. Joy.

I did, however find this article about sqlexpr32 command line switches which should allow you to perform the Express install from within a normal MSI install by just running the exe with the proper switches. Not ideal, but it’s something.

Application Configuration

0
Filed under Software Architecture, VB Feng Shui

I’ve played a bit now with the .NET configuration model and while I can certainly see some elements in there to like, it seems to me that it falls short in a number of different ways.

First off, it doesn’t really have any concept of “multi-level configuration.” In fact, it’s basically a single level XML file (granted, you could create a hierarchical organization within that single xml file, but there’s other issues with that). .NET does help a bit with the concept of a machine config file, but from what I can tell that’s about as far as it goes.

Second, the default behavior is to locate the application config file in the same path as the application itself. That’s great if your user is running as administrator, but not so great in more locked-down situations where users do not have full admin rights. In those cases, configuration that’s writable needs to be stored somewhere within the user’s profile directory structure. This is just going to get worse with Vista, too.

Ok, sounds good but what, you may be asking, is a multi-level configuration scheme, and why would I want one? Almost every app I’ve ever worked on, short of the trivial utilities I’ve built, has required this sort of configuration scheme (or at the very least greatly benefited from having it). It almost always follows along this line:

  • Administrator specified User specific configuration (rarely used, the user cannot change this configuration)
  • User specific configuration (that the user can change dynamically)
  • Group specific configuration (typically set by a system administrator or group admin and read only to users)
  • Machine specific configuration (typically set by a system admin, and rarely used, read only to users)
  • Application global configuration (typically set by the system admin, read only to users)
  • OEM defaults (typically set by the app developers to provide default config values, generally readonly by everyone except the developers)

At each level, the system provides for an essentially unlimited number of name value pairs that can be cordoned off into groups (or sections as they used to be called in INI files). Some may argue that a section-name-value system like this is too limiting and you should always accomodate full hierarchical structures, but I’ve found the extra functionality rarely necessary.

Of course, the type of value (string, int, date, etc) for a particular setting is defined within the application, but value types might also be defined as OEM default settings. Should sysadmins really be able to change setting X from a string to a date? I’d imagine not usually.

The trick and the real beauty of the system is in the way that setting values are resolved. The resolution logic basically says that if the app can find a setting at a higher level in the hierarchy, it uses that value. Otherwise it searches down the hierarchy till it either finds a value, or till it drops to the OEM defaults. If no setting is specified at the OEM level, the system defaults to blanks, or 0′s depending on the data type.

So, for instance, the code might ask for the setting “AskOnExit” from the “Prompts” section. The config handler needs to look first at the “level of most significance” which, in the above list of levels, would be the Administrator specified user specific settings (ie those settings that are set on a per user basis, but that the user himself doesn’t have the authority to change.

If the setting isn’t found there, the code continues down the hierarchy, looking at each level in turn until eventually in run through them all and returns the default or a blank or 0.

And, of course, you also have to provide a means to retrieving and writing a setting at a specific level in the hierarchy, for those settings that are always application level or machine level or what not.

Obviously, such a scheme requires a little more work up front, but the configuration flexibility (especially when you’re talking about major, multi user systems with lots of configuration options, typically off-the-shelf, reseller-friendly applications like accounting systems or CRM packages), is a huge selling point to admins and users alike.

Why, then does configuration handling in .NET seem so archaically primitive?

Could you roll all these levels into that singular .config file? Sure, when where would you put it? In the Application path? No, users won’t typically have write rights there. Under the user’s Application Data folder in the Profile? No, can’t put app wide settings somewhere that only a single user can access it. How about that machine config file. Again, not writable by typical users.

It’s funny that Windows already has a rights system that is very stable, quite flexible and easy to work with, both manually and from within code and yet it often goes completely unused by larger apps. I’m talking, of course, of the file system.

These days, though, web apps are de rigueur and you can’t go assigning file system rights to web users. There’s no way that would fly with most web developers (you weren’t really thinking of something like that, right?). So, roll it up into a simple table, with a getSetting and a setSetting stored procedure to simplify the coding. With proper indexing, and a little intelligent caching, it’ll be every big as fast as using the .NET configuration functions, and whole lot more flexible.

Long story short. If your sideline utility needs to save a few settings, use the .NET configuration. It’s fast, relatively easy and convenient. But for just about everything else, take a little time and do it right.

Your users and their sysadmins will thank you.

Minims

0
Filed under Misc

I was looking for a particular reference book today and stumbled across a little book I hadn’t looked at in ages. It was a favorite way back and it’s still pretty funny now.

The book is the “Book of Minims” by Tom Weller. It’s appearently out of print now, but Mr. Weller has made the whole thing available online here.

In case you’re wondering, Minims are the opposite of Maxims, basically, sayings that sound like they have a deep meaning but in reality are so obvious or specific as to be useless.

One of my favorites: “Money is it’s own reward”.

Good stuff.