Stored Procedure References

Last week, I did a little work to track down unused stored procedures in a large-ish SQL Server database.  Searching for references in source code was interesting all by itself, but I also wanted to see which procs were referenced by other procedures.  This is what I came up with:

select 'referencing proc', 'referenced proc'
	sysdepends d,
	sys.objects o1,
	sys.objects o2
where = o1.object_id
	d.depid = o2.object_id
	and o2.type = 'P'

Quora Blocks Startup Search Engines

According to an article on ReadWriteWeb, Q&A site Quora is blocking search engines from indexing its site — all, that is, except for Google, Bing, and a couple other big players.  If this is true, this is a really chilling development for the competitive landscape of the Internet.

Image representing ReadWriteWeb as depicted in...
Image via CrunchBase

Google is plenty big enough all by itself — just look at how difficult it’s been for Bing to claw out any sort of market share at all.  I’d really like to think that the market is still open to someone who wants to build a better mousetrap, but this sort of behavior is going to make it just about impossible for a new player to break into search.

So take a look around — this may be as good as search gets.

Enhanced by Zemanta

How *not* to help your users

I got an email this afternoon from “VMWare Communities.”  You’ve seen emails like this, I’m sure — here’s your status, and some stuff you might be interested in, and so on.  Emails like this are generally intended to strengthen a connect with customers, which is great — normally.

In this case, though, there was a section of the email entitled “Your Content”:

Activity around content you’ve created or contributed to

When I saw this, I was pretty excited, because I’d forgotten (for the time being) about both of these issues.  I’d posted questions in VMWare’s forums for a couple of issues, and I hadn’t recalled seeing solutions for either of them.   According to the newsletter, though, there were updates available on both questions.  Happy day!

Until I went and read the forum topics.

It turns out that VMWare’s little newsletter-writer counting tool was counting *all* views and *all* replies, so in both cases, it turns out that my post was the last one in the topic.  Worse, yet, my posts were six and nine months old, respectively (no wonder I’d forgotten about them).  So instead of reaching out and building ties with me, in this case, VMWare merely succeeded in reminding me that their open issues aren’t being fixed, and that their support forums are effectively dead.

“You break up…call back in six months.”

Spec’ing a Computer

I recently helped a friend build a new PC, and I threw a few notes together along the way.  If you’ve never built a PC from scratch (or haven’t done so recently), you may find some of these things helpful.  Note that the focus here is on building a high-end business machine or a developer workstation.  I’ll try to point out some places where you’d bump up specs for a gaming machine, but there are really plenty of other guides out there for “ultimate gaming machines”.

Since we’re building a business machine, we’re looking for good performance without breaking the bank.  The notes below are organized by component; if you work your way through the list, you should end up with a pretty solid build.

Case: A mid-tower gives you plenty of room for all but the most extreme expansion.  Some crazy-big video cards might be tough to fit, but there’s no reason to buy those if you’re not building a gaming PC.  Compact cases are nice & tidy, but might have limited drive bays, and probably won’t be as easy to cool.

Styles range from conservative to gaming styles with all sorts of windows & lights.  Plain black should be fine.  Some will come with power supplies, and may be a bit cheaper as a result.  Unless you know what kind of power supply is included, though, you might be better off getting that separate.  Power supplies, believe it or not, are actually pretty important to having a reliable, quiet system.

Be sure to check out how many internal 3.5″ bays the case has.  A case with four or more internal bays gives you plenty of room for expansion, and usually has good options for cooling the drives.  I’ve found that it’s helpful to put a fan on hard drives, so look for a case that will facilitate this.

Good brands: Antec, Cooler Master, Thermaltake.

Target price point: $50-80.

Power supply. For most new system builds these days, 400W is just about entry-level.  If you start adding extra drives and gaming video cards, you can get up in the 650-750W range.  Typically, you won’t need anything bigger than that unless you’re going to do a gaming build with run dual video cards, overclocking & water cooling.

Look for an “80 Plus” or “Bronze” energy certification (or better).  “Modular” supplies let you plug in only the leads you need, so you have fewer wires in your case.  This is a nice-to-have, but not critical unless you plan to gaze lovingly at the guts of your PC.  Extra wires can be tucked out of the way so they don’t interfere with cooling.

Good brands: OCZ, Thermaltake, Corsair, Antec (except for low-end), Raidmax.

Target price point: $60-90.

Processor. I’d stick with Intel here.  I think AMD still gives you a slightly better value, but not by much, and I think Intel’s performance is a little more consistent.  This choice is pretty tightly connected with your choice of motherboard and RAM, as they’ll all need to match.  Skip Celerons (Intel’s entry-level series) and Core 2 (the last-generation mainstream processors).  A Core i3 or i5 processor will be perfect for this sort of build, though.  If you’re really concerned about processor speed, you could go for an i7, but an i5 should be fine for most development needs.

You’ll see references like “Manufacturing tech: 32nm”.  Newer tech is smaller, so 32nm is newer than 45nm.  This isn’t a big deal, but all things being equal, the smaller components will be more energy (and heat) efficient.  If you see power consumption listed (ex: 73W), a lower number will run cooler and cheaper.  For a development machine, get a quad-core processor.

Target price point: $150-250.

CPU cooler. When you buy a retail (“boxed”) Intel processor, it’ll come with an Intel heatsink and fan.  In most cases, this will be fine.  An aftermarket CPU cooler can cool better and run quieter.  I’d skip this unless you really want to shoot for a super-quiet PC or you want to overclock the CPU.

Motherboard. The CPU socket on the motherboard must match the socket of your processor (ex: Socket LGA 1156).  Not all Intel CPUs have the same socket, so be sure to check this.  Other features:

  • Size – most MB’s will be ATX or micro-ATX.  Both will fit in a mid-sized case.  The micro-ATX is needed for a compact case.  If you’ve got a mid-size case, get an ATX board — it’ll be easier to work with because the components won’t be as cramped.
  • Chipset – Intel usually has one or two mainstream chipsets (matched to the CPU), and one premium chipset, which adds the latest cutting-edge features.  Stick to the current mainstream (probably P55 / H55).
  • RAM slots / max RAM.  Look for boards with four slots.  Most boards you’ll see should support up to 16GB of RAM, which is more than you’ll need.  If you see one with slots in multiples of three (triple-channel), this is a high-end board meant for a Core i7 CPU.  Don’t confuse this with DDR2 vs. DDR3.
  • SATA ports – you’ll want one per hard drive (including an SSD) and one per optical drive.  Most newer chipsets give you six or more, which will be fine, and you’d prefer 6Gb/s SATA vs, 3Gb/s.
  • SATA RAID – this tells you that you can do software RAID on the motherboard.  Most will have 0/1/JBOD, which is fine for you (you want “1”).
  • eSATA – “external SATA”.  This is for plugging in an external hard drive.  If you don’t have USB 3.0 (below), this is another way to speed up an external hard drive.
  • PATA – old-style drive connector.  Optional – can be handy if you want to reuse an optical drive or plug in an old hard drive to copy its contents to your system.
  • PCI-x (PCI Express) slots.  Most expansion cards you’ll buy today will be PCI-x.  You’ll want a PCI-x 2.0 x16 slot for your video card.  Boards that support multiple video cards will have more than one of these slots (up to three).
  • PCI slots.  Older expansion cards will use PCI slots.  It’s nice to have one of these, just in case.
  • USB ports.  Look for somewhere around 6 USB 2.0 ports.  Some motherboards now have a couple of USB 3.0 ports – this would be nice if you can get it without paying an arm and a leg.  This will let stuff like external hard drives work a ton faster (once you’ve got a compatible external hard drive).
  • Onboard video.  Motherboards with the H55 chipset can work with compatible Core i3 and i5 processors to do graphics acceleration without a separate video card.  You probably want to go ahead and get a separate card for a development machine, but this could save a few bucks and allow an easy upgrade later.
  • Onboard audio- you’ll want this.  Any kind will do.
  • Onboard LAN – you’ll want this, too.  Look for 10/100/1000 support.  Some boards have two ports, which can be handy, especially if you’re going to run VM’s (you can bind the VM’s to one of these lan ports).

Good brands: Asus, Gigabyte.

Target price: $80-150.

RAM. You’ll want at least 4GB or more — probably at least 8GB for a development machine.  Dual-channel is fine — that’s what you’ll get on mainstream motherboards.  You’ll probably want to look for DDR3.

Good brands: I like GSkill, but Kingston, Crucial, and Patriot are also good.

Target price: $75-90 for 4GB, or $185-ish for 8GB.

Video card. You want good, basic graphics acceleration for the Windows desktop to work well.  Gaming is a whole other story — you can drop a ton of money in a hurry on a gaming system, so for the purposes of this discussion, I’ll focus on “normal” graphics needs.

Video cards have chipsets by either ATI or NVidia, and the chipsets are so much a part of the card that a card made by Evga is pretty much the same as a card by Gigabyte or another manufacturer as long as they use the same NVidia chip, for instance.  This is true to the extent that you’ll actually get drivers from ATI or NVidia rather than Evga, Gigabyte, etc.  It’s tough to call whether NVidia or ATI are better.  I think ATI is pretty hot right now, especially in the mid-market, but NVidia was the best for a number of years.  You can toss a coin on this one.

Pay attention to the connector(s) on the back.  Many now give you an HDMI connector, but you’ll want to make sure your monitor can support this.  If the card also has a DVI, you’re pretty safe.  Dual-screen support is a near must-have for a development box.  Look for at least 512MB of video RAM.  GDDR5 is faster than GDDR3, which is faster than DDR2.  You should be able to find 512MB of GDDR5 at a pretty reasonable price point.  Look for DirectX support for at least 10, but 11 would be better.

Good brands: Pretty much not applicable, per discussion above.  Focus on getting the chipset you want.

Target price: $80-150.

Storage. The best setup for a new build today is a Solid State Drive (SSD) plus two or more data drives set up as mirrored pairs (RAID 1).  The SSD gives you a fast boot time and fast loading for your applications, and the hard drives give you redundant storage for your data.  You’ll want to use Serial ATA (SATA) drives for all storage on a workstation — avoid IDE (old and slow) and SCSI (server use only).

SSD drive. This tech is actually still changing pretty rapidly.  As these drives have matured, their performance is characterized by the drive controller chipset they use (much like video cards).  Right now, the best overall controller chipset is the Sandforce chipset, so any Sandforce-powered drive will tend to perform similarly.

Good brands: Intel, Kingston, OCZ.

Target price: $150-250.

Hard drives. With the price of hard drives today, mirrored drives are almost a no-brainer.  Years ago, RAID was only available via expensive dedicated peripheral boards, but now, just about every motherboard you can buy has SATA RAID built into the motherboard.  I’ve been running mirrored drives on my workstation for a few years now, and this setup has saved me tons of time.  Recovering from a drive failure is even easier than restoring from a backup; just replace the faulty drive and let the RAID controller rebuild onto the new drive while you keep working.  Note that RAID isn’t a replacement for a backup — it’s another layer of protection, but having said that, I’m a huge fan.
If you’re going to run RAID-1 (mirroring), it’s best if you start with two identical drives.  Note that “identical” isn’t a requirement if you have to replace a drive, but it’s best if you’re setting up a new mirror.  When picking drives, you’re looking for capacity, spindle speed, and cache size.   Right now, the sweet spot for drives is moving from 1TB to 2TB.  There are 3TB drives available, but they’re still pretty expensive.  Spindle speeds for SATA drives will generally be either 5400 RPM or 7200 RPM.  You can find 10,000 RPM drives, but they’re not worth the price, since you’re using an SSD for the stuff you really want to load quickly.  In fact, using a pair of larger, slower 5400 RPM drives for your data will be quieter, cooler, and more efficient than 7200 RPM drives, and the speed difference shouldn’t impact you a lot if your apps are all run from an SSD.  Caches are used to speed access on these drives; larger caches are generally faster than smaller caches.

When buying hard drives, it’s worth looking at the warranty.  Most will be three years, but if you can, find one with a 5yr warranty.

Good brands:  Samsung has actually been getting really good reviews for the last couple years.  Hitachi, Seagate, and Western Digital are also about the same.  I know I swore off WD a few years ago, but I’ve seen as many failures in Seagate as I have in WD.  All hard drives will fail — that’s why you’re going to mirror yours and get one that’s got a good warranty.

Target price:  $60 for 1TB, $90 for 2TB.

NAS / Drive Arrays. If you’ve got big storage needs, you’re going to need to build something more capacious than a single mirrored drive can provide, and at some point, you’re going to end up looking at Network Attached Storage (NAS) and/or drive arrays.  You can purchase something like this (ex: Drobo) or build your own.  Up until a couple months ago, I would have put a Windows Home Server box on the short list for your NAS needs, but given the recent hubub over their forthcoming VAIL release, I’d be reluctant to jump on that bandwagon right now.  Although focused mainly on WHS builds, there’s a great forum on that’s got information on all sorts of DIY storage server builds if you’re looking for ideas and/or inspiration.

Optical drive. You’ll want some sort of DVD reader / writer, and for a few bucks more, you can get Blu-ray, too.  This is a good place to save a couple of bucks if you don’t need Blu-ray.

Good brands: Lite-On, Asus, Samsung, LG.

Target price: $20 for a DVD writer up to $100 or more for a Blu-ray burner.

Floppy drive. Skip it.

Extra fan(s). I’d recommend  installing an extra fan to cool your hard drives.  I’ve had better drive reliability on my system since I put a fan on them.

Final note:  Since the shelf life on this sort of guide is pretty limited, you’ll probably find that specific recommendations for brands, chipsets, prices, and so on will go out of date pretty quickly, but I hope that the general concepts here will apply for a while yet.  Good luck!

Choosing an open-source platform

As an architect, I’m sometimes asked to evaluate and/or choose platforms for software, web sites, and so on.  As you might imagine, choosing a platform can be an enterprise-critical decision, and one of the big forks in this road is whether to consider open-source software.

I’m not going to touch that debate here – this tends to be a pretty religious point with a lot of people, and I’m not sure I can add too much value to a religious debate.  Instead, I’m going to assume that you’re at least open to open-source software and you’d like to evaluate some alternative open-source alternatives.

The factors you’re evaluating in an open source platform really aren’t too different from the factors for a closed-source platform:

  • Community size and stability
  • Ease-of-use
  • Ability to extend / grow
  • Indirect costs
Logo Open Source Initiative
Image via Wikipedia

Without a doubt, the most important factor of all for open-source platforms is the size and vitality of the community, which ends up being pretty vital for the long-term viability of the project.  While it’s certainly true that you’ve always got access to source code if you need it, you really don’t want to count on that if you can avoid it.  A large, active community implies a bunch of good things for the platform:

  • Lots of people have already evaluated and bought into this platform.  No matter what you experience on this platform, chances are, you’ll have company.
  • Lots of contributors means that the platform is more likely to keep growing.
  • An active platform will get important update (like security patches) more quickly.
  • A large community means a large market, which means lots of people offering services.  If you need something, and you can’t find it for free, there’s a good chance you can hire someone to help you.
  • If you’re looking at a platform that supports some sort of extensions, plugins, themes, etc., a large community usually inspires more people to contribute to these pools, which means more choices for you.
  • With any luck, you might even be able to find user groups for your platform of choice.  These groups can help you with free advice, as well as put you in contact with other people who can help answer your questions.

One last thought:  consider where the platform gets its funding.  In some rare cases, open source projects are funded entirely by donation, but when organizations reach a certain size, there really has to be a plan to pay the bills.  Watch for “freemium” models, where certain functionality might be available in a “community edition” of the platform, but the latest and greatest stuff is available only to paying customers.  This certainly isn’t a deal-breaker, but understand that you’re going to have to wait in line for new stuff, or deal with an upgrade to a paid version at some later point.

Enhanced by Zemanta

Matthew Groves: OR/M Comparisons

Matthew Groves has been working on a series of articles comparing some OR/M frameworks.  So far, he’s done some posts on Entity Framework and Fluent NHibernate, but I believe he’s planning on hitting a couple more, too.

If you’re a .Net developer, you know what a “lively” subject this always is.  Data access consumes so much time and effort in most applications that it’s worth educating yourself on the options so you can make informed decisions.  I’d also recommend checking out a couple of these frameworks yourself, as merely reading about these frameworks isn’t quite the same as using them on a project.

Here’s a list of Matthew’s posts so far:

Ray Ozzie takes us back to Windows 1.0

This one is definitely worth a read:

Early Windows logo (1985-1992)
Image via Wikipedia

I’m back.

Be sure to check out the Windows 1.0 press kit that he scanned in.  I can’t believe it’s been 25 years, and Microsoft has  managed to add — what — Direct-X and muti-monitor support, I think.  I love how “Paint” is a big selling point, and CD technology is broken down like it’s a flux capacitor or something.

Ahh, simpler times.

Google Irony

You’ve probably heard of Blogger.  It’s a (duh) blogging tool, and it’s one of the most popular platforms available for casual bloggers.  It’s simple, easy to get started with, and it’s hosted (and owned) by Google.

You know what else Google does?  They build a browser called Chrome.  Perhaps you’ve heard of it.  I’ve heard of it.  I’ve been using it for the last couple of years, and it’s generally really nice.  ‘Cept here’s the good part — it doesn’t like to work with Blogger.

Note - no image

I happened to see a new blog post from Roger Sessions today — it popped up in Google Reader (yeah, I drink the Kool-Aide), and I clicked over to his site to leave a comment.  So far, so good.  When I clicked the link to comment, however, it popped up a comment form in a popup window (minor annoyance, by the way), but then, I noticed that there was a Captcha-style image verification panel that wasn’t actually showing an image.


This has got to really cut down on spam comments, right?  Intent to get my message to Roger, though, I opened his blog in Firefox and clicked the comment link — it turns out Google likes Firefox better than Chrome:

No problem here...

Looks fine in Firefox, doesn’t it?  Incidentally, I also tried in Internet Explorer and saw the same problem I saw in Chrome, but then, I hit the link a second time, and it was fine.  Having hit upon a possible solution, I tried again in Chrome, and sure enough — it worked fine in Chrome, too, the second time around.

I’m not sure what the problem is, here, but it’s pretty telling that Google hasn’t seen fit to update the commenting system on Blogger.  After all, the native commenting system in WordPress has undergone continuous improvement since it was launched, and it’s also stupid-easy to integrate commenting systems from folks like Disqus (which I use) and Intense Debate.

If you’re a blogger, you may want to look at giving Blogger’s commenting system the boot in favor of one of these other systems until Google gets its act together.

Enhanced by Zemanta

Thoughts on blog comments

This morning, I saw a tweet from Mike Figliuolo where he was sounding off about an anonymous comment on one of his blog posts, indicating that he’d left a “scathing reply”, and asking for reactions.

As so often is the case, I started to leave a comment on his blog, but as it grew, I figured I might as well make a post of its own about it.  There are a number of core issues going on here, in my opinion.  If you’ve got a blog, or even if you just comment on others’ blogs, it’s worth considering how you feel about these issues.

Do you want comments?

Chez Castel
Image by @rgs via Flickr

If you’ve got a blog, it’s your baby and you can do what you want with it, but I think it’s important to be clear about your objectives with respect to comments.  If you’re really interested in a public discussion of the thoughts presented on your blog, then you’re somewhat obligated to embrace and foster an open exchange of ideas.  If, on the other hand, you’re not really all that interested in an open discussion, then turn off comments.  I suppose a third possibility is that you want to see comments, but only the ones that agree with you.  In my opinion, this also really defeats the purpose of comments.

Whatever your objective, it stands to reason that if you respond to a negative comment by going nuclear, you’re not going to encourage an open exchange of anything at all.  Sadly, it’s a given that people behave more rudely and abusively on the web than they would in person (especially under the veil of web anonymity), and this shows up in comments.  When you see a comment that strikes you as truly abusive or destructive, you’ve got every right to moderate it, but in the case of Mike’s anonymous commenter, that’s not what I saw.  What I saw in Mike’s response, though, was Mike suggesting that the commenter hadn’t read his post (or, apparently all of Mike’s previous posts) carefully enough to form a well-reasoned opinion.  That’s not a great way to encourage more discussion.

How’s the weather in your little echo chamber?

If you blog, why do you do it?

Although there are any number of reasons, I suspect that every blogger at some level wants to make an impact on people.  We want to share our opinions and, hopefully, sway some readers to consider our opinions, and hope against hope, maybe to even adopt our opinions.

So how much are you really accomplishing if you’re only reaching people who think just like you?

But that’s not what I said…

If someone reads your post and comments in a way that makes it seem like they read a different article than you wrote (which, I believe, would be Mike’s assessment in this case), it may be because they just weren’t paying attention.  It might, however, just mean that they’re reading it with a different bias or perspective.  Contrary to your first reaction, this just might be your target audience.  Here’s someone with a different opinion than you, and they’re sharing their thoughts on your blog.
Everyone’s experienced conversations where we’ve said something that just didn’t come out right, or perhaps it came out sounding just fine, but someone ended up hearing something completely unlike what we meant to say.  We call this communication.  Any time you utter a thought, it’s just a stream of lonely, disembodied words until it comes to roost in someone else’s noggin.  Here’s the crazy part, though — your listener / reader is going to interpret your words on the way into their grey matter, and they just might find meaning in your words that’s a little different than you intended.
You can find volumes of material about this, but again, as a communicator, if you see that this is happening, consider the following:
  • Be thankful that you’re aware that you can see the impedance mismatch.  Most of the time, if someone doesn’t get what you’re saying, they’ll just tune you out, and you’ll never know it.
  • Review your message to see if there’s any way you can change the delivery to clear up misunderstanding.
  • Engage the reader to try to understand why they interpreted your message differently than you intended.  Telling them that they’re not too bright doesn’t count as “engaging”.

If you’re looking for an example of open discourse done right, Robert Scoble is the best I’ve ever seen.  There are plenty of people who disagree with almost everything that comes out of his mouth, but Robert will engage any of them in an open conversation about what he’s said, and he does it without taking negative comments personally.  As a result, Robert has made a name for himself as a communicator, and I suspect he may have even learned a thing or two along the way.

Who have you seen that manages comments well?

Related articles by Zemanta

Enhanced by Zemanta

More thoughts on Microsoft Lightswitch

A couple weeks ago, Microsoft announced a tool called Lightswitch, and the response in the development community has been almost universally tepid.  One of these responses really caught my eye, though.  It was from Bill Vaughn, who’s been the patron saint of Microsoft data access for as long as there’s been Microsoft data access.  This guy knows a thing or two about what works, and he was dumping all over Lightswitch.

Construction in Gibraltar.
Image via Wikipedia

I left a comment on his post, and I thought it had been swallowed up by the great spam filter in the sky, but Bill just  resurrected it (thanks, Bill!) and responded.  It looks like the biggest fear with Lightswitch is that this tool is going to be used to create a bunch of garbage apps that “pros” have to come and clean up later.  This sentiment is echoed across many of the lukewarm comments I’ve seen elsewhere, too.

But even if all these bloggers are right about the quality of Lightswitch applications, I’m still not convinced that there isn’t a place in Microsoft’s developer tool portfolio for something like this.
  • We already have developers cranking out lousy prototypes, but with today’s tools, they take longer.  In fact, they take long enough that an awful lot of developers look to platforms like Ruby-on-Rails to do prototyping, and that’s not helping the MS developer tool position a whole lot.
  • If a tool like this were positioned specifically as a “non-production use” tool, you’d have at least a chance of setting proper expectations about would need to happen in order to scale apps up for production deployment.
  • There are very few shortcomings in Lightswitch that couldn’t be substantially addressed via some sort of code generation.  A modern-day “upsizing wizard” could solidify a database schema, generate an Entity Framework model, even generate stored procedures if you want them.  The work I’ve done recently with the Code-First functionality in Entity Framework’s recent CTP convinced me that the concrete constraints we’re used to between DB and data access code might go away soon.  I’ve also seen some really great schema transformation capabilities in Visual Studio‘s Database Projects.  When this stuff comes together, I can absolutely envision a “pro” developer sitting down with a Lightswitch application and refactoring it into a high-quality application.

All good developers would rather see an application start out with a proper foundation and high-quality architecture.  We hate seeing messy apps, and we hate cleaning up after junior developers, or worse — amateur developer wannabes.

But there’s a business problem that we can’t ignore: we’re expensive – especially when we sit down to “do something right.”  There is a need need for business owners and managers to produce prototype applications at a reasonable cost.  If Microsoft doesn’t provide that capability, someone else will.  You may not like that, but it’s a fact.

And here’ s another fact:  If applications are being prototyped on someone else’s application development stack, guess which stack is going to get first crack at upsizing those apps when they need to be scaled?

Lightswitch might not be the prototyping tool we’d all like to see in its current form, but don’t let that distract you from the fact that Microsoft needs to be present in this part of the market.  It’s important for them, and it’s important for you, too.

Enhanced by Zemanta