Wednesday, April 21, 2010

Setting up SVN

I've used this guide from Coding Horror several times over the past year. It takes the reader through the install and configuration of a simple SVN server. The end solution is hosted as a Windows Service and provides simple user authentication.

Also, Programming Nightmare does not directly borrow its name from Coding Horror :-)

Friday, April 16, 2010

DBML (LINQ to SQL) Wonkiness

I like using DBML (LINQ to SQL) as an ORM system when I'm doing work in C#.NET. It's far from a perfect solution but it's easy to use and expandable (partial classes for the win).

Visual Studio 2008 has a graphical DBML file editor which allows you to drag tables from a SQL Server database onto its canvas. Probably the biggest pain working with this setup comes when making DB changes and you need to reflect those changes in this graphical editor. The best solution I've come up with in doing this is to basically delete all the tables you've updated, then drag them back onto the canvas. Unfortunately this requires deleting stored procedures that return an object of that table type.. So you have to re-add those as well, which makes this non-scalable solution. (If you have a better update solution, please post it!)

This is where the wonkiness comes in. I've had the following happen a few times: I have the DB Server connected inside Visual Studio and at the same time I'm making updates to it within SQL Server Management Studio. Changes are made to the database within Management Studio and I'll need to go through the above process in Visual Studio. Then something goofy happens. I'll be unable to add a stored procedure, receiving an error that indicates that the SP's return object does not match the Table shown in the graphical editor. Or Foreign Keys won't appear in the graphical editor or its produced code. The problem persists until Visual Studio is restarted. After a restart everything will work as expected.

This wonkiness has me caused some hair pulling over the last year. Hopefully this tip - restart Visual Studio if the graphical DMBL editor isn't behaving as expected - will save you some time.

Tuesday, April 6, 2010

Getting Back Into Gaming

I have fallen out of touch with the gaming universe.

It happened slowly... I quit checking evotab.com for new articles every hour. Then I'd check it every day and just glance over the feeds for something interesting, not having time to keep up on all games on all consoles. I quit reading PvP. I didn't listen to the Gamers With Jobs podcast. I stopped watching Zero Punctuation. Before long I fell behind on Dubious Quality, xkcd and Penny Arcade..

As of today, it's been over 6 months since I've felt "in touch" with the gaming industry. It really came to light today when I stumbled across this article, from 2 weeks ago. (Nintendo has released some info on the Nintendo 3DS, a new handheld which will be unveiled at E3 this year). Back in my gaming days, this is the type of thing that I would have known about less than an hour after the news broke. And I would have been incredibly excited about it. Now it's something I'm interested in and somewhat disappointed that I didn't know about.

I don't need to get back to the point where I get know the hourly news on every game. However, gaming is something I'm interested in and passionate about, a hobby that I want to keep my nose in and an industry I enjoy keeping abreast of. I firmly believe that happiness is a product of doing the things you enjoy (advanced concept there). What does it say for my future if I'm unable to make time to do the things I enjoy today, when I have so little responsibility?

So I'm going to tiptoe back into gaming news. I plan on reading the sites I loved: Dubious Quality, xkcd, Penny Arcade, Rock-Paper-Shotgun, Gamers With Jobs.. These are all easy to digest in 15 minutes a day. Today I bought a little something-something to jumpstart these refound habits:


Sure I'll miss the breaking, sometimes obscure Kotaku and Joystiq news; I will get the highlights instead. I'll be doing something I enjoy, regardless.

Monday, April 5, 2010

Batch Photo Resizing

This is how I want picture resizing to work: Drag pictures or a folder onto an executable icon, that exe should then transcode those photos (recursively exploring sub-folders) to a Facebook / CD-RW friendly 1 megapixel image.

The Google brought me this app: Picture Resizer 4.0. PR4 works just like I've outlined above! Configuration is done by renaming the executable (appending options to the end of it). The site has a "Renaming Wizard" to help you out with this:


Shown are the options I used, which gave me images in the kB's rather than the MB's. Who needs all those pixels anyway?

Picture Resizer 4.0. Googling so you don't have to.

Friday, April 2, 2010

UnDelete a file with Glary Undelete

How often have you heard the question (or asked it yourself), "I just deleted something, is there any way to get it back?" These slap-your-forehead requests are usually asked frantically and in times of panic as users quickly come to the realization that their last 3 days of work may be gone forever.

But be still! Remain calm. We can rebuild him, we have the technology. It's called Glary Undelete.

I found this program over vacation after my girlfriend mistakenly deleted 3 days worth of photos from a Kodak camera (why would you make a 'Delete all photos' option so readily accessible, I will never know). This free program was able to restore all 300 photos and make me a hero.

There are certainly other programs that would accomplish the same task but I found that finding a free one can take a bit of effort. Paid programs go so far as to show you the files that it COULD restore, provided you pay the $20 to activate the product. Teases.

Glary Undelete. Googling so you don't have to.

Thursday, April 1, 2010

Bringing the blogs

April is a time for warmer weather, frantic work on semester projects, and blogging.

Last year a number of my friends attempted 30 blog posts in 30 days during the month of April. The object of the exercise was (and is!) to a) actually blog; and b) get better at blogging.

30/30 is getting another run this April and I'm going to try and keep up! The participants:


Looking forward to it.