Wednesday, October 9, 2013

Die Skype!

Every now and then Windows starts up with Skype running but not in the system tray.

For the life of me, I don't know why. The only way to then go into Skype is to 'launch' it again, which brings the app into focus and on the Taskbar. But then, since I minimize to the system tray and don't keep it in the Taskbar to save space, it gets lost again :(

It's also a pain opening up the Task Manager just to close Skype. So, the solution, kill skype!

    Start -> Run -> powershell -command "ps skype | kill"

Tuesday, February 19, 2013

LESS is more

If you're a Visual Studio web developer and you haven't tried out the Web Essentials extension by Mads Kristensen, then GO NOW, GET IT!

And for those who do know about it, and you were using it for it's LESS support, then you may have noticed in the last update how it was removed :( The only alternative then would appear to have been T4CSS.

But the same day I updated and saw the lack of LESS support, was the same day that I realised it's now baked into Visual Studio in the most recent ASP.NET and Web Tools 2012.2 Update.

It supports adding LESS files from the New Item dialog, and upon build will generate the CSS and minified CSS for it too. Which is obviously the reason it was removed from Web Essentials. Awesome :)

Thursday, February 14, 2013

Git tip - diff of only modified files

I was wondering how to see a diff of only those items that were modified in my Git workspace, and thanks to Stackoverflow, you can use the --diff-filter parameter:

git diff --diff-filter=M
git dt --diff-filter=M

The second one is if you use a visual diff tool. I prefer WinMerge, might do a post on my setup at some point, it's pretty simple once you know how.

Wednesday, February 13, 2013

Where'd my Visio BMPN stencils go?

For some reason, when opening up a saved Visio diagram that uses the BPMN stencils, these no longer show up in the Shapes window.

To get them back, click on More Shapes > Open Stencil... then find the Visio content directory, in my case this is C:\Program Files\Microsoft Office\Office14\Visio Content\1033, and then enter BPMN*_M.vss to show only the metric BPMN stencils. Select them all, then click Open.

I have no idea why it isn't stored with the document somehow. Apparently if you go to File > Info > Properties > Advanced Properties and then check the Save workspace option, then it should save things like this, but that's checked for me and it doesn't. Maybe because it's the Professional version and not the Premium version, but I doubt it. Sounds like a bug to me.

Thursday, February 7, 2013

Easier way to get to that hosts file

In Windows, there's a hosts file mapping IP addresses to hostnames. For some weird reason, it's in the arbitrary location of c:\windows\system32\drivers\etc\hosts. This kinda reminds me of a Unix/Linux path, with the \etc\hosts. But anyway. That's often too much to type in when just trying to go Start -> Run -> notepad++ hosts. So, use symbolic links :) Something else that is Unix/Linux like, that not many people know exist on Windows:

C:\>mklink hosts c:\windows\system32\drivers\etc\hosts
symbolic link created for hosts <<===>> c:\windows\system32\drivers\etc\hosts

Then you can just say, notepad++ \hosts.

Much easier.

Friday, December 28, 2012

Podcast Reunited

I used to struggle to get iTunes to download podcasts properly. Sometimes they wouldn't download fully, or couldn't be resumed and had to be re-started (IIRC, might have just been other downloads that did this). So I would download them as MP3's from the shows' archive websites, e.g. .NET Rocks!.

There is a problem with this though. When you add the files to iTunes, they are picked up as normal music, and not podcasts. This is sorted out easily by going into the file info and changing the Media Type to Podcast. Simple.

What is not so simple is why there are now two separate podcast entries - one for the subscription we used before, and one for the episodes that were downloaded manually. I used to ignore this, and just have them all on one playlist, but recently when I was re-importing everything into iTunes on a re-installed PC, I noticed this again and wanted to solve the issue.

MP3 files come tagged with ID3 tags. The standard ones such as artist, album, track number, etc. are easily editted in most audio programs, including iTunes. But for podcasts, there are some extended ones, namely PODCAST, PODCASTURL, PODCASTID, etc., which I found out using a program called Mp3tag.

You can update these tags using Mp3tag, and probably other software. For more info on this, see the question I asked (and answered) on Superuser.

Sunday, November 11, 2012

Refactoring Databases

On Friday I did a presentation at Entelect's internal dev days regarding Modern Database Development, and how best practices of Agile Development are widely known and regarded in the community, but how we rarely see the same rigour with database development.

And it's not new. Martin Fowler, Scott Ambler and Pramod Sadalage have written books and blog posts on Evolutionary Database Design and Refactoring Databases, going back to at least 2003. But we don't always see people employing the techniques and tools that have been discussed in the past ten years.

I didn't even know about dbdeploy nor the Red Gate developer tools until this year. I've only been on one real life project that used a custom developed database patching tool to roll out database changes and a base for integration testing. But I definitely believe these tools and techniques must be employed more regularly.

I have to say, the presentation went well. I received a lot of positive comments from people and I think that the audience may have got something out of my talk, which is great news. In fact, I was even asked straight afterwards to help someone out in how to help them compare the data in two production databases.

Look up the tools I mentioned, dbdeploy, Red Gate Source Control, SQL Compare and SQL Data Compare, as well as Microsoft's SQL Server Data Tools. dbdeploy is open source, the Red Gate Developer Tools comes with a trial version, and SSDT is free if you have Visual Studio.

Let's all get better at what we do.