Posts
654
Comments
545
Trackbacks
1
Wednesday, September 01, 2010
Memristors are coming

They are coming baby.

posted @ Wednesday, September 01, 2010 2:45 PM | Feedback (1)
Tuesday, August 31, 2010
cqrs for dummies – an interlude – Greg Young’s sample app

Greg has posted that he has created a sample app for CQRS, which you can find here.

It is indeed called “SimplestPossibleThing” and it’s pretty accurate, but it is good code to review.  I especially like “InfrastructureCrap.DontBotherReadingItsNotImportant.cs", I mean, come on, what else would you look at first.

Seriously though, it’s important to see a simple implementation of all of the main components.  Check it out.

posted @ Tuesday, August 31, 2010 1:33 PM | Feedback (0)
I Like Windows Home Server

I took my computer into the place I bought it, so that I could get them to figure out why it won’t turn on.  I’m hoping it’s just the power supply that’s crapped out.  Turns out there’s a six day waiting list till they even get to it, but out of stubborn principle, I’ll wait.

<rant>there are just certain things I don’t want to do anymore, damn it.  I used to be a line cook (though a friend of mine is/was a chef, I never got that bug, which is probably a good thing, because being in the food industry, for most people, for the most part, largely sucks.  I have nothing but respect for the people who get up and work in front of 500 degree ovens on the line, often at two places, so 8-16 hours a day sometimes, day in and day out, week in and week out, in many cases immigrants making a better life for their kids.  They are fantastic people.  I just don’t want to do that sort of thing anymore), and amongst the many tedious jobs was peeling and deveining shrimp.  Brings down food cost to have manual labor do it.  But I’m an adult now and if it costs me an extra buck or two to buy it already stripped, I’m doing it damn it.  Same thing with computers.  I’ve opened waaaaayyyy too many computer cases in my time, and unless it is something like adding a video card, I don’t want to.  So if I have to a stupid $70 diagnostic fee and wait six days because I don’t want to replace a power supply, I know it is a waste of time and money, but damn it, I don’t care.  But I digress.</rant>

The likelihood that I will actually wait for six days without just buying a new computer and copying over any data not backed up is pretty close to nil (I’m guessing in about 4 hours I’ll surrender), so one of the things I’ve been doing is checking to see what exactly gets backed up automagically every night.

As it turns out, apparently just about everything.  It’s sweet.  I’m not sure how they do it either.  I keep Outlook open all the time, and normally that locks the .pst files.  Nope, backed up.  SQL Server data and log files?  They’re in the backup. 

Of course, I won’t know for sure what’s up till I attempt a restore, so I’m copying over my entire ‘My Documents’ folder to another machine to see if the mail files load, but it looks like, short of hibernation files and the like, it copies the entire damn hard drive.  Sweet.

Now, to try to resist dropping a grand on a new rig……..

posted @ Tuesday, August 31, 2010 1:11 PM | Feedback (0)
Monday, August 30, 2010
An effective test strategy

Jimmy Bogard has a good post up on LosTechies about the different types of tests you might run on a code base.

As he points out, categorizing different types of tests can be annoying, but he separates them into full-system, subcutaneous, and unit tests.

I’m long on record bitching about unit tests.  Unless you are building a framework, where you don’t know up-front how your framework might be used (users are fun that way), TDD is terrible.  Some form of ‘godawful syntax’ BDD type spec stuff is much better, since you know what the inputs will be from the end users (as fun as they are) and so that is all you really need to test, and it drives what your tests will look like (as opposed to the random “let’s create 8 vars and see what happens” method of testing TDD encourages.

I’m interested in his distinction between full-system and subcutaneous testing.  When building apps (like the web apps I’m typically working on), I prefer the full-system tests.  Those are what your users are actually doing and you can actually work with them if a spec fails.  When dealing with batch files, I also prefer full-system tests (there’s almost nothing more useless than a TDD-style test of a batch file process).  At the same time, I have also used (what I didn’t know what to call) subcutaneous tests, where you are, more or less, testing your system end-to-end but without UI interaction.  To use a simple example, if you are testing tax rate calculations, it’s often really important to know that the ‘behind the scenes’ processing is giving you the right tax information for a given order, and there’s no need to drive this from a UI.

In any event, I think it’s a good read.  Check it out.

posted @ Monday, August 30, 2010 8:35 PM | Feedback (0)
Reminder: Check your backup strategy

Backups are great, but only as great as the last time they were tested.

I run multiple machines on my home network, but one is always designated as the main one, and sure enough, it bit the bullet Sunday night.  I think it is only the power supply.  At least I hope so, because if it is the motherboard, pain is in my future (well, more pain than getting the power supply changed, something I used to be able to do in my sleep but which I now pass off to the store I bought it from because I am old and slow and stupid).

Because I use Windows Home Server, most everything is backed up automatically each night.  At least I think it is, that is one of the things I’m verifying now.  The code that I am working on is distributed on multiple machines (albeit manually most of the time) so I’m confident of that part.

Especially if you aren’t running a multiple machine home network, are you confident your important data is being backed up?

posted @ Monday, August 30, 2010 8:19 PM | Feedback (0)
Saturday, August 28, 2010
Creative Zen X-Fi 2 64 GB Review

I wanted to like it.

I have used various music players over the years, but mainly the Creative Zen.  I don’t use iPods because I have too many things that are in .wma format (yeah, yeah, I know) and I hate iTunes.  I’ve used Sansa products before, but after returning the 3rd one with a white screen of death, I decided they didn’t quite have the most robust quality control.

My current player (which I’ve had for a few years now) is a 32 GB MX and it is close to full.  You can put things on an extra SD card, but you have to access it differently from the other content.  And it’s a few years old.  And a contract was renewed.  And I got a raise.

Anyway, for the longest time, 32 GB was about the high limit, so when I noticed that Creative had a 64 GB unit, I decided to give it a try.  I was pretty disappointed, which is why I’m returning it.

There were two types of problems with it, technical and usability.  Since I didn’t try it for very long once the technical problems popped up, perhaps I would have figured out the usability problems.  The immediate one is that on my current player, if a song pops up then you can pretty quickly find a song you like better if it happens to be on the same playlist or loaded close to it.  Perhaps because the X-Fi is touch-enabled, I couldn’t figure out how to do it.

The technical problems were the deciding factor.  When you add content to a Zen, when you disconnect it from your computer, it has to rebuild indexes (or something), and is unusable while it is doing it.  On the MX, it takes maybe 20 seconds to do it.  With the X-Fi, it took 20 *minutes*.  Even if you didn’t add content, it would rebuild indexes after disconnecting (at least it did once).  So that really wasn’t going to work out.

The other issue is that the firmware has a hard-coded 8000 file limit on what you can load into the X-Fi.  Well, I already have more than that many files on my MX, so I had the luxury of a 64 GB player that I couldn’t add another file to.  Well, I guess that might not be technically accurate.  It did load the files, but you could only ‘see’ 8000 of them.  After the fact, I saw some other online comments about this.

Needless to say, I decided it wasn’t worth the time to screw around with it.  Back to Amazon it goes.  Maybe a Zune, or maybe when the new iPods come out in the coming weeks, I’ll give them a look.

posted @ Saturday, August 28, 2010 5:02 PM | Feedback (0)
Friday, August 27, 2010
Initial Impressions of UberProf, Part 2

In a previous post, I talked about the first 30 minutes or so of working with the various parts of UberProf.  It’s been a bit longer, so I wanted to update some of that.

EFProf

Previously, I noted the following:

“Since it is long before I care about profiling this app (since it is a test database used to satisfy my specs), I won’t go into much of the details, but one interesting thing I noticed is that, in a routine where I am doing naughty N+1 things in a loop, it only flags the last three selects as N+1, even though all six are identical (except for the values in the where clause).  I’m going to have to keep an eye on this.”

I can update that by noting that this is per design.  Let me digress as I am wont to do.

What counts as ‘bad’ when it comes to profiling SQL statements is, to a certain extent, context-dependent.  Ayende (and whomever else) designed the profilers to note things as alerts based on their experience.  But, he also made a number of them configurable.  The Select N+1 alert is one of those configurable items.  The ‘naughty’ things I was doing happened to be in a loop where there were six of them. The first three did not get alerts in the UI, the last three did.  Well, as it turns out, the configurable piece of this was very clearly set to only start to mark an alert on the fourth item, and so the UI did exactly as it was configured to do.

IF (and this is a big if) the end user (me) thought that this setting should be on the first Select N+1 or the 97th, then I could have done so.  Once I set it to alert on the 1st Select N+1 (as a test), it did so.

What I like about this is that the profiler will always (well, it should, see below for more) profile every call, and allow me to set some settings to the levels that I prefer.  It’s up to me to decide those levels.  In other words, the tool allows me to put in my own expectations.

In my mind, this is a very good thing.

L2SProf

Things get a little more rocky here.

As the previous post noted, the profiler didn’t work on my L2S web app.  It either threw an error (using the v4 dll) or didn’t profile (using the non-v4 dll), neither of which was a good thing.

After mailing the issue to the Google support list and not getting a response in a day or so (I think), I did email Ayende directly, after which all communication has been through the support list.

<digression>This should be taken with a large grain of salt, but it was a bit troubling that the initial message made it through proper moderation but didn’t get action until I emailed Ayende.  I believe he happened to be in the midst of travelling as he always does, so I understand it, but it was troubling, not so much to me personally, since I knew it would be addressed, but more to the business partners I’m working with, who don’t know Ayende, don’t know Alt.NET, etc.  This is something that is endemic to ‘smallish’ support, and something I am very painfully aware of.  Unless I am personally working on a support issue, various external groups don’t necessarily know that their questions have been acknowledged.  To be perfectly clear, with large support groups, you often have the reverse issue, where you might get some immediate acknowledgement that your support question has been noticed, but you don’t know if there is an actual human being working on it till it works through whatever internal ticketing/queuing system they happen to have.</digression>

The long and the short of the whole shooting match is that my code was creating L2S data contexts in a way that was different from the standard way of doing it (I am overriding the standard constructor), and once I made that clear, Ayende was able to give clear and explicit instructions of something I needed to change in my code base, while also fixing the “security transparent method” error I was getting on his end with a new build.  (Note: As I’m writing this, there may be a lingering issue, but I’ll leave that to another post if it really is an issue).

Having said that, there was some ‘broken window’ problems.  To use an analogy, in NYC, at some point, there was a crackdrown on addressing broken windows.  Though I completely leave aside the question of the efficacy of the thing, the idea was that if the authorities in Times Square started to address issues like broken windows, real serious crime would also go down because of the added focus.  An individual broken window isn’t a serious crime issue, but if it is addressed as one, then there’s an expectation that serious crimes would be addressed.

All of the profiler tools have a notification when a new build is available.  Within L2SProf, when you clicked on the notification, the app crashed.  This is not a confidence builder.  It’s a broken window.  “If the new build notification process doesn’t work, what else doesn’t work?”  It’s a simple thing, one might say a trivial thing, but it does make a difference.

Now that I’ve said all that, let’s get to the good stuff. 

Once the profiler started working, it immediately raised very clear and targeted alerts about what could be improved.  Having only worked with it for an hour, these alerts seem to me to be spot on and accurate.  There are very clear improvements that can be made to my app and how I coded various methods.  This is exactly why I bought the thing.

Quick Summary

The process by which I got the L2SProf app to work was a bit less smooth than I would have liked.  If I had not bought the thing and just done the trial, I probably would not have made the purchase but put it on the back-burner.  Since I had bought the thing, having worked through the initial difficulties, it seems to be worth the price.

I plan on posting a before and after comparison post once I analyze some data further.  I am encouraged by what I see so far.

posted @ Friday, August 27, 2010 9:06 PM | Feedback (0)
Thursday, August 26, 2010
cqrs for dummies – an interlude – notes from Greg Young’s USA Weekend Class

Greg Young has been doing a number of EventBrite Live Meeting type sessions over the last month.

I haven’t been able to attend any of them, but Jeff Doolittle posted a summary (if you can call a 17-page PDF a summary) of the latest one.

Good stuff, check it out.

posted @ Thursday, August 26, 2010 12:24 PM | Feedback (2)
Friday, August 20, 2010
Public Image Limited–Ease (not even remotely live)

Normally, I wouldn’t post a ‘video’ where there isn’t a video, really, just a shot of the cover.  The oddness of the lyrics of the song, combined with the brilliance of the guitar solo and the fact that there was never a live version of this that could do it justice, makes this an exception.

Recorded arguably before Steve Vai was Steve Vai, this song was on a release by PIL that was, well, odd, in many ways.  If you got a cassette (“Daddy, what’s a cassette?”…”Shut up”), the title of the release was “Cassette.”  If it was an album…you get the picture.  In one of the weirder combinations of all time, you get John Lydon singing a song with an unbelievable guitar solo from Vai.  I haven’t the slightest idea how this was thought-up, but it works.  Supposedly, Vai thinks this is one of his best solos ever, but I read that on the Interweb, so who knows how accurate that is.

What I remember from the review in whatever guitar magazine I was reading at the time when the release came out was the description of the solo as “pinballing.”  No, I don’t know exactly what that means either, but it seems to fit.  Enjoy.

Procreation
Have a nice day
These things in ease

What makes you happy
Your misery
These things in ease

Susan and Norman
You're so normal
Susan and Norman
You're so normal

 

posted @ Friday, August 20, 2010 10:02 PM | Feedback (0)
Can you help find me find the song that matches this lyric, #1

Google search is an awe inspiring thing (well, sort of).  I’ve mentioned before that I sometimes wonder how developers wrote code before Google existed.  I simply cannot seem to memorize syntax well.  Bouncing between css, html, c#, t-sql, vbscript, perl, foxpro, and other things these last couple of years, without some combination of Google and intellisense, I would be lost.

Ironically, I also have, at times, near photographic memory.  Now, I think just about everyone has near photographic memory when it comes to significant events in their lives.  For instance, I remember where I was when the Challenger exploded, or what was happening the day of 9/11, and also for more personally significant events, and that isn’t something that I think is that unusual. 

But I also have near photographic memory of all sorts of things that, one would think, wouldn’t qualify as being significant enough.  One area appears to revolve around song lyrics.

To give an example:

Back in what must have been 1997, I was driving to Boca Raton, FL from South Beach to teach one of my classes at Florida Atlantic University.  A song came on the radio that I really liked, but the station didn’t identify who it was by at the time.  I think I knew at the time that it sounded a lot like Peter Gabriel.  8 years later, I remembered the experience, and remembered the line “what was it we were thinking of.”  Through the power of Google, I was able to identify it as “Secret World” of off Gabriel’s Us album, and it remains one of my favorite songs of all time (you can guess a YouTube post will be coming at some point soon if there’s a decent version of it).

Why is that something I would remember 8 years later?  Beats the heck out of me.

Anyway, this leads to the point of the post.

Given the client I was working at, I know it was around 2004.  The client was in an industrial warehouse type place, and so for lunch, I would go drive around for half an hour and listen to the radio, then pick something up and come back.  The radio station was WXRT, which at the time had a terrible web site that wouldn’t give you the playlist for the day, so you couldn’t just go look up what you heard.

The singer was someone I didn’t recognize (a male), and the two lyrics that I remember are:

“I haven’t said grace at dinner/Since the day my father died” and in the chorus “Sing a simple song” (which I think was sung by a female or female lead chorus, but that I don’t remember as strongly)

My Google-fu is strong, but I’m drawing a blank.  “Sing a simple song” is a lyric that is fairly common (I think I used it back in the day when I wrote songs), so you get a lot of hits on Sly and the Family Stone or the Temptations, but the other would be a straight hit on Google, if anyone had ever posted it.

I thought that Google recorded everything that had ever happened in the course of human history, but perhaps not.

Or I could be “mis-remembering” it, but I don’t think so.

posted @ Friday, August 20, 2010 8:52 PM | Feedback (0)