Logo




Subscribe:
RSS 2.0 | Atom 1.0
Categories:

Sign In


[Giagnocavo]Michael::Write()

 Tuesday, March 13, 2007
Outsourced Evolutionary Programming

My friend just dealt with an oursourced project. Yes, outsourced as in sending it to a place that charges a lot less money than, say, developers who actually know what they're doing.

One of their deliverables was a program that compressed an XML string into a gzip file. Should be a minor thing, right? The C#/.NET 2 code is less than 10 lines. Well, their first delivery produced files that contained the text "System.Byte[]". This was not accepted and they vowed to look into it in more as they were sure the code was correct.

Their next files were a bit larger and supposedly were really correct this time. But still, no zip program could read the data. Well, a quick look at the beginning of the file shows the bytes EF BB BF -- the UTF-8 BOM. The rest of the file was ASCII digits. Yes, they wrote the bytestream out as a UTF-8 interpretation.

If we define evolution as "the non-random survival of randomly mutating replicators", we can define their approach as "the non-random acceptance of randomly mutating programs."

Code | Humour
Tuesday, March 13, 2007 5:51:08 PM UTC  #    Comments [2]  |  Trackback

 Tuesday, August 08, 2006
Wow, Nikon's VR is as good as they say

Having just got a dSLR (Nikon D50, rather low-end) with the cheap kit-lens (some Quantaray lens), I had been looking for a better lens. Most of the photos I take are inside, mainly snapshots. I've never seen flash photos that look that great, so I prefer to use the existing light. Of course, indoors, this makes for some really nasty blur in most cases. There's just not enough light inside my house to be able to get a fast enough shutter speed.

I read some reviews about the Nikon VR (Vibration Reduction) lenses, and that they supposedly compensate for 3 full stops. I tried one VR lens out in a store, and it seemed pretty interesting, so I ordered the Nikkor 18-200 VR. Unfortunately, Nikon apparently doesn't know anything about logistics or manufacturing, and this lens is backordered 2-6 months (depending on who you ask). Since I don't want to be taking crappy shots for that long, I grabbed the Nikkor 24-120 VR as a temporary lens. Well, I'm not sure it'll help my crappy shots, but at least they won't be blurry.

I got home, it's dusk, and decided to try it out. For fun, I set the exposure to 1 second, and well, let the results speak for themselves:


VR Off:


VR On:


Ignore the actual value of the image (I'm not a photographer), but just look at the blur. Granted, I was lying against a sofa, so I had a bit of something to lean on, but the difference with VR on == wow! So, given a bit of support, I can take pictures, handheld, with exposures > 1/15, no problem. Worth every dollar.

Yes, I know this is nothing new, but I'm so impressed I wanted to write it down (also helps my rationalization on buying the lens :)).

Photography
Tuesday, August 08, 2006 2:01:21 AM UTC  #    Comments [1]  |  Trackback

 Friday, July 28, 2006
Logical rebuttal to eBay's sniping policy

Sniping is placing your bids seconds before an auction ends. This allows the buyer to get an item for less money, since there is no bidding war. eBay allows and encourages sniping. Google for eBay sniping to find services that do this.

People say this helps them save money since there is no bidding war, and they don't accidentally get carried away. Well, if you have no self control, then you've got other problems.

Sniping fundamentally goes against eBay's system. Let's take sniping to its logical conclusion: everyone snipes. In this scenario, you essentially have a sealed-envelope auction. Everyone submits their bid, then at the end of the auction the person with the highest bid wins. But eBay is NOT a sealed-envelope auction. If it were, then why would eBay have outbid notifications?

A lot of the justification for sniping is ridiculous:
    "It helps us control spending." -- So does eBay: type in your "true max" into the eBay proxy bidding, and you're done.

   "It allows us to be away from the computer." -- So does eBay's bidding.

   "If auctions auto-extended to avoid sniping, then we'd be on for hours." -- Only if you wanted to exceed your "true max" as snipers are so fond of calling it. This contradicts the "controlled spending".

eBay simply contradicts themselves on that simple premise: why offer services (outbid notifications, showing bid history, etc.) that go against sniping, if sniping is something that should be done? Moreso, why does eBay themselves not offer a sniping service, and instead makes you pay a 3rd party? The lack of critical thought in this country is astounding.

Any pro-sniping people out there, feel free to post a rebuttal in the comments. If there's any real reason 3rd party sniping sites should exist, I'd love to know.

Edit: Removed horrible wording at beginning :).

Friday, July 28, 2006 3:39:28 AM UTC  #    Comments [8]  |  Trackback

 Wednesday, June 07, 2006
EA Tricks Players into opting in

Just got an Xbox 360 and tried Burnout Revenge on Xbox Live. For some lame reason, you have to play on EA servers (I believe it's so they have more of an excuse to get your details). Anyways, they ask for your permission to use your Xbox live data. The prompt looks like this (paraphrasing):

Can Microsoft share your Xbox Live account with EA?
A = Yes , B = No

This is the standard Xbox 360 convention, where A = Accept/Next/OK and B = Reject/Back/Cancel.

Then they ask two more questions, Can EA spam you with their newsletter, and can EA share your details with other companies. This time the responses are:
A = No, B = Yes

Of course, you're trained to press B for no and by the time you realise they've tricked you it's too late.

Way to go EA, thanks for just making sure we have a reason to hate your company. And Microsoft, WTF? What about making sure the user is in control? MS should not allow their partners to behave like this.

Misc. Technology
Wednesday, June 07, 2006 2:38:14 AM UTC  #    Comments [2]  |  Trackback

 Saturday, May 27, 2006
TF53010 mentioning sp_InsertProjectDetails

I got this error while using Team Build today (from the event log):
TF53010 ... Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression ... sp_InsertProjectDetails ...

According to http://geekswithblogs.net/cyoung/archive/2006/03/09/71820.aspx, this is a bug in the RC (yes, I still haven't had a chance to goto RTM). I'm not sure if it's fixed in RTM or not. At any rate, my issue was that I had 2 shared projects (projects that are included in more than 1 solution). The second shared project references the first. These seems to cause Team Build to die, with no error in the build log. The event log has more details. So, I added a hack of a file reference instead of a project reference for that solution and things seem to build.

Misc. Technology
Saturday, May 27, 2006 10:38:26 PM UTC  #    Comments [0]  |  Trackback

 Wednesday, May 24, 2006
Vista Tablet PC Enhancements

Here's one thing I love: Vista Tablet capabilities :). The tablet input area is always visible as a ~5 pixel deep tab, and it throws a drop shadow on windows in the foreground:

 
Pointing at it makes it slide out so you can click to open:

I prefer that to the hovering icon that appears on textboxes. Of course, it has nice animations and so on, showing it sliding in and out, and you can drag it around the screen.

Another thing that looks promising: Personalized handwriting recognition. My handwriting is very bad (22 years on a PC and counting!) -- and XP Tablet messes up a lot when trying to read it. Now, via a "Speech Recognition Training"-style UI, you can train it for your own handwriting by writing in 50 different sample sentences. Oh yea, and it's localized too (train for other scripts).

Also, a small, but profoundly useful enhancement: Different pointers and click effects when using a stylus. When you target using a stylus, you get a small diamond cursor. Clicking makes tiny ripples. It looks really superb, and it's great to get that kind of feedback. Although, at first it scared me, cause I thought my screen was damaged, and the rippling was from pressign on the LCD too hard ;).

Along with pen-mode feedback: holding down the pen button ("right click") adds a circle around the diamond pen cursor. Right clicking makes the circle do a beautiful blue "energy" glow. The cursors don't show up in my screenshots, but here's the right-click energy circle thing:


Finally, a "Pen Flicks" feature makes navigating and so on by pen easier. If you, well, flick the pen up/down/left/right, you can scroll or move that way. Perfect for web browsing, reading, etc., even though my Toshiba R10 has a directional button on the display. There's also an edit mode so you can do things like undo, etc.



Now I just need to install Office 2007 (OneNote in particular) on my tablet to see if there's some awesome integration and so on...
Misc. Technology
Wednesday, May 24, 2006 8:32:30 PM UTC  #    Comments [1]  |  Trackback

Vista Beta 2 Still can't scale DPI correctly

One of the big features of Vista was supposed to be that it was resolution-independent so that high resolution displays can be used. This makes extra sense when you think of Media Center on high-res systems. I have a Dell 24" LCD, 1920x1200 resolution and I run Media Center on it. Outside of Media Center, things look horrid. So I gleefully installed Vista Beta 2...


You still have to reboot after changing DPI. Sigh, ok... And then? Things look like crap. Half the windows seem to scale somewhat decently, half don't. And the ones that scale? Ever blown up an image in Photoshop? Yea, it looks worse than that. Seriously, WTF? There is supposed to be all these advanced graphics rendering capabilities, but they still can't render high DPI stuff correctly. Even the "Back" button (the round circle with arrow) looks like a horrible upscaled image. Pathetic. I've got no problem shelling out the $$$ that Vista ULTIMATE (sigh, MS marketing and sales needs to be caned) will cost IFF it's gonna make my home PC/MCE be one extremely slick amazing thing. But they've got a way to go, apparently.

Misc. Technology
Wednesday, May 24, 2006 6:51:04 PM UTC  #    Comments [0]  |  Trackback

 Tuesday, May 23, 2006
Office Outlook 2007 Beta 2 100% CPU

Anyone else having this issue? When I use Outlook, it sometimes just spikes to 100% (well, 50% since I have hyperthreading). This is making the magnificent Beta 2 release of Office 12 almost unusable.

-- OK, seemed to be the indexer, as I left it alone for two hours and now it's behaving... strange...

Other than that... WOW. Sending an email never looked so good :).

Misc. Technology
Tuesday, May 23, 2006 9:56:47 PM UTC  #    Comments [8]  |  Trackback

One year ago to the hour

This night, at around 23:30 we went to the hospital because Gaby was having contractions (3 months early). Exactly one year ago, to the hour, we went to the hospital for Mei. Fortunately, this time it wasn't as big a deal, a few injections and tests later and we're back home, everything ok for now... Just very... odd/coincidental/? that down to the hour we were going back to the hospital, one year later.

Mei | Personal
Tuesday, May 23, 2006 8:50:39 AM UTC  #    Comments [1]  |  Trackback

 Sunday, May 21, 2006
Happy Birthday, Mei!

Mei was born a year ago, on 19 May 2005. Happy Birthday, Mei!


We love you forever Mei

Mei
Sunday, May 21, 2006 5:17:09 PM UTC  #    Comments [2]  |  Trackback

 Friday, May 05, 2006
SQL Server 2005 Reporting Services Configuration Madness

Well, after almost exactly 6 hours, I've succeeded at installing SQL Server 2005 Reporting Services on a server with more than one website.

We're running Reporting Services on separate web servers. So, after the install of reporting services, you run their little configuration tool. This of course, accomplishes very little :). See, apparently Reporting Services wasn't designed to work on a server running, *gasp*, more than one application.

If you have a decent IIS install, the default website isn't there and thus requests to http://localhost/ aren't gonna work. Reporting Services doesn't take this into consideration, and happily tries to request http://localhost/ReportServer/ even after you've specified this in the config tool. If this is your issue, you'll get a “HTTP Error 400: Bad Request“ when trying to access the ReportManager (/Reports/) website.

You'll need to edit the config files in Program Files\.....\ReportManager and ReportServer. rsreportserver.config needs to point to http://the.reporting.host.name/ReportServer in the UrlRoot element. In RSWebApplication.config, ReportServerUrl will need to have the same value. The ReportServerVirtualDirectory element must be deleted. You will get a “The configuration file contains an element that is not valid. The ReportServerUrl element is not a configuration file element. “ message. This is because the config reading code apparently doesn't fail gracefully. What it's trying to say is “the ReportServerUrl and ReportServerVirtualDirectory elements are mutually exclusive”. I'm still unsure why there should be anything besides a URL...

Around here, you might notice a bunch of DCOM errors in your Event Log (or before this point). To fix these, you'll need to go into dcomcnfg and edit the COM security for My Computer. Give the account you're using (like Network Service or “MyReportingServicesAccount“) permissions for local activation and local launch. You need to reboot for these changes to take effect (I think). But don't reboot just yet...

Finally, you end up with a 401 Unauthorized when accessing the Reports site. You might have also noticed you are also unable to authenticate when browsing the Reports or ReportServer sites from your the local server. Why?
“Windows XP SP2 and Windows Server 2003 SP1 include a loopback check security feature that is designed to help prevent reflection attacks on your computer. Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name.” So I'm guessing NTLM susceptible to this type of attack, and Microsoft is saving us from it. Well, it also hoses us in this case because from what I can tell, ReportManager (the thing in the Reports vdir -- why it wasn't called ReportManager by default...) needs to connect to ReportServer. It sends a request, which is denied because of the loopback protection above. A quick registry edit fixes this: http://support.microsoft.com/default.aspx?scid=kb;en-us;896861

After that... you might have a working SQL Reporting Services 2005 install! (Next up: Getting it to work with SSL...)

Really, apart from the horrible setup/configuration, it's a very very fine product. I'm actually pretty impressed. The report I wanted to setup (and the subscription so it's mailed out) only took about 10 minutes (first time I've ever used RS)! I'm just at a loss why Microsoft makes it so hard to setup. This configuration can't be that unusual. And, even stranger, most (if not all) of this configuration issues could take care of these problems. In other words, their little configuration app should automatically fix this stuff (or at least give explicit instructions on how to do so). Or maybe I just didn't RTFM that well... but this is a Microsoft product... you're supposed to just shove the DVD in the drive and click next, right? <g>

P.S., if you're getting a “Object Reference not set to an Instance of an Object“ when you add a new subscription, ensuring everything else is 100% working should make it go away...

Code | Misc. Technology | Security
Friday, May 05, 2006 6:02:44 AM UTC  #    Comments [8]  |  Trackback

 Tuesday, December 27, 2005
Microsoft finally realises VS2005 web site apps suck

http://webproject.scottgu.com/Default.aspx

YEY!!! Finally, after 2 years, we get VS2003 functionality back in VS2005. The biggest pain point I have, every single day, is dealing with the vile VS2005 web sites. Microsoft has finally realised that this monstrosity spawned to soothe the demented minds of webmonkies who think HTML is a programming language is actually bad for real developers. Really, how does catering to the people who think “build“  refers to writing code help them? (Oh wait, I know. It allows them to gain access to “web developers“ while knowing that people who know what they are doing still won't defect.)

This is exactly like I predicted -- Microsoft will have to back down. I guess it took the final RTM launch for everyone to try to upgrade their apps and then find out that the new model is unusable. I wonder how many PSS cases/pieces of feedback they got.

Well, I can't wait to change our projects to this format. I was planning on restructuring our solution (22 projects in VS is unwieldly) anyways, and this will go great with it. I know a few developers who are gonna be real happy when they come back after the holidays! Maybe this means that doing a public refactoring in our solution won't take 45 seconds anymore? Maybe these apps will build in less than a minute (like every other C# app)?

Oh, BTW, I'm far from ungrateful, even though I might sound like that. I'm actually very happy that the ASP.NET team is doing this, despite the fact that I might roll my eyes and say “yea, about time!” :). But after going through all the pain I have... perhaps its understandable.

Code
Tuesday, December 27, 2005 2:25:54 AM UTC  #    Comments [1]  |  Trackback

Microsoft and VoIP

I love Microsoft products (except DRM-crippled products... more on that later). So, it hurts me when MS doesn't play its full potential. Area of this time: VoIP.

I've been doing VoIP full-time for over a year and a half. Not exactly a long time, but not too short in this market. I think a lot of people miss the most important part of VoIP. The use of packet-switched versus circuit-switched goes way beyond being able to use cheaper transit and hardware. The real power that IP brings is that the shift can move from hardware to the software. As VoIP platforms become available, the power shifts because voice is finally something every developer can control. This goes back well before the current wave of VoIP-craziness and super-inflated company valuations.

Microsoft was here quite some time ago. NetMeeting was released in 1996 and had a decent API (Well, I've not used it, but the docs seem to indicate a lot of power). Messenger continued this (well, except I don't think the API allows you to do anything interesting). So Microsoft was certainly there back then; this isn't a completely new territory.

Software means no needing to spend $$$$ on all sorts of features. For instance, many vendors sell a “voicemail module“ at a decent price. What exactly is a voicemail module? Isn't it nothing more than a simple IVR + recording function? Sigh.

Skype
Hence, you might now understand why I think Skype is silly, or more to the point, MS screwed up again. Messenger (and NetMeeting before that) has had all Skype's features for years (including PSTN connectivity). The *only* thing Skype did was allow audio to be proxied. Yes, that's their only interesting feature. Had MS simply done that, perhaps Skype would never have surfaced. I remember the first time I heard about Skype. Someone IM'd to tell me to download it so we could voice chat instead of IM. I was really puzzled and pressed the Audio button in Messenger and asked “Like this?”.

Apart from the audio proxy problem, many users just didn't know that audio chat in Messenger exists. I don't know people can miss this, but whatever... Just like some folks are pretty amazed at what Netmeeting can do... even more so when I say it's from 96. Microsoft simply failed to market these features. Now they have to play “catchup” and do announcements like “VoIP will be in Messenger Live!”... That's just.... lame.

Speech Server
Speech Server seems pretty cool. Indeed, multi-modal app development and, well, speech recognition, are pretty cool. However, instead of making a killer product that allows you to build whatever app your mind dreams of, they tied themselves to horrid hardware, essentially rendering this product way more expensive and inaccessible. Intel Dialogic? Please. SIP is only available as a 3rd party addon. I asked around to find out more about what MS's plans for VoIP application development are, and there's nothing too interesting (say, the level of what I can easily do with Asterisk and C# today) for at least another year. Maybe MS has some secret surprises, especially in light of the rising VoIP hype. Even so, I hate seeing MS have to react in these scenarios instead of leading.

Where Microsoft should be looking
People tell me that VoIP isn't MS's core market. I don't know about that. Voice communications are a huge hub of daily life. Up until now, this was relatively inaccessible to Microsoft. But with Windows 2003 having great reliability, CPUs now fast enough to easily handle several T1s of voice, packet-switched voice, cheap TDM interfaces -- it's now completely accessible. (Asterisk has proven this.)

Business
On the business side, Exchange and Live Communications Server seem to want to jump right into this market. I see no reason why there shouldn't be a Microsoft PBX product. The biggest hurdle is getting a decent hardphone vendor to play along. (Although, Microsoft absolutely rocks when it comes to interface hardware, so I'm sure a hardphone from MS would win awards.) Really, why shouldn't our IM/email/voice/etc. systems be all nicely integrated? I'm quite sure MS will get into this space, even if it takes several years and an acquisition to do so.

(Heck, if MS wasn't so damn late to the scene, they could have designed a good VoIP protocol. As is, we'll probably end up having to live with that abomination named of SIP for the next two decades or so. )

Home
Seeing how MS is so desperately trying to get into things such as your living room (Xbox and Media Center), I don't see how taking over voice seems so far fetched (I heard a rumour about Xbox offering VoIP anyways). Voice fits in perfectly with the “eHome“-digital-lifestyle that MS is trying to own.

Developers
Of course, everyone knows the path to victory lies with developers. And everyone recognizes that Microsoft is king in that arena (save the few Delphi fans who don't realise Anders now works for Microsoft). Microsoft needs to have a very comprehensive and complete set of VoIP (both Video and Voice) APIs and *services* that make it easy to integrate into both Windows and web applications.

For instance, it should be trivial for someone to write a program that allows customers to call in and check their order status via phone (trivial in dev effort, upfront costs, and service setup). Connecting a user via voice, be it via PSTN or direct-VoIP, should be easy. The littlest of VB developers :) should be able to do this without spending much time at all. And then, MS should market the heck out of it so people realise this functionality is there...

Let's see how long it'll take Microsoft to get to that point.

VoIP
Tuesday, December 27, 2005 2:07:40 AM UTC  #    Comments [3]  |  Trackback

Yey!

Well, we found out that Gaby is pregant again -- due sometime around the end of July (near my birthday? ^_^).

It was really exciting seeing the test show the two lines -- unbelievable at first. Then, really sad , as it brings back so many memories (well, not like we don't re-live them every day anyways). I can see how parents have a hard time equally sharing among too kids. Sometimes I feel guilty getting so excited about this new one when I think about little Mei. I realise that Mei would want us to be happy for her sister, but it still feels sad.

Anyways, I'm sure as soon as I can start feeling her my outlook will pick up. Right now she's a little jumping grain of rice :) -- 146 heartbeats/minute.

Mei | Personal
Tuesday, December 27, 2005 1:49:35 AM UTC  #    Comments [3]  |  Trackback

 Friday, August 12, 2005
I can't be online yet

Landing: 15.30
Shuttle to downtown Denver: 45 minutes
Getting tour of apartment and keys: 30 minutes
Stopping by leasing office to find closest wireless vendor: 2 minutes
Figuring out that 16th street has no relation to 16th avenue: 20 minutes
Walking to 16th street: 7 minutes
Purchasing Ricochet modem: 5 minutes
Walking back: 7 minutes
Installation: 3 minutes

So, yes, it's quite possible to get medium-speed, non-premeditated Internet access in a new apartment, without any knowledge of a city you've just landed in.

Personal
Friday, August 12, 2005 12:58:33 PM UTC  #    Comments [4]  |  Trackback