Time saver – Audible page load notifications

We devs… We write code, save, flip over to the browser, press F5 to refresh the page… and wait. And wait. And probably wait some more.

That’s no way to live. Some sites can take quite a while for the page to load, typically due to background processes that need to get warmed up before the site beings to act smoothly.

Personally, I want to be doing other things while I wait for that page to load. But I don’t want to forget that I was ever waiting for the page to load. I want an audible notification that the page was ready for me to work with. And I want it to be a generic tool I can tweak to work with any website/page I’m working on, without having to modify the actual website.

And so I installed Tampermonkey in Chrome. I guess it’s like Greasemonkey, but I’ve never used that either. :)

Turns out, I was able to get exactly what I want relatively easy.

I don’t even understand how that beep() function works, but it does. Smile The important thing is the @match line at the top that instructs Tampermonkey to run the beep function when that page is finished loading.

Now I can press CTRL+F5 in VisualStudio and switch over to responding to emails until I hear the beep that lets me know the webpage has finished loading.

Advanced nuget command line ninjary

Small post here, but I just wanted to post something. It’s been too long. Smile

I had a need yesterday to reinstall a group of nuget packages and didn’t want to go through 8 pages of packages in VisualStudio, hand picking the ones I wanted to reinstall. Nor did I want to type update-package <package name> –reinstall for every single page, mostly because I couldn’t easily remember the names of all the packages that needed reinstalling.

Also, update-package doesn’t have a way to specify a wildcard, so you can’t do something like update-package *DefinitelyTyped*.

But then I remember that there’s power in PowerShell.  Behold…

get-package | where Id -like “*DefinitelyTyped*” | foreach { update-package $_.Id  -reinstall }

Pretty rad. I had never heard of get-package before I wrote that line. So then I though, can I install every DefinitelyTyped package at once?

And just for fun, what if I wanted to install every DefinitelyTyped package related to Bootstrap?

get-package -ListAvailable | where {($_.Id -like “*DefinitelyTyped*”)-and ($_.Id -like “*bootstrap*”) } | foreach { install-package $_.Id }


What other clever ways have you combined PowerShell and nuget?

Finding duplicate code in C#, VB.Net, ASPX, Ruby, Python, Java, C, C++, ActionScript, or XAML

Whether you realize it or not, you need a tool that finds duplicate source code in your applications. In fact, if you’ve never used one before, you probably don’t realize how much you need an automated solution to this problem. It’s nearly impossible to manually locate the types of duplicate code that such a tool can easily bring to the surface. Even if you think you’re intimately aware of an application’s code base, every line of code you write contains the potential to awaken the duplicate code dragon.

To combat the problem, we have Atomiq – what I consider to be the best solution for finding duplicate/similar code in C#, VB.Net, ASPX, Ruby, Python, Java, C, C++, ActionScript, and XAML.

…Continue reading “Finding duplicate code in C#, VB.Net, ASPX, Ruby, Python, Java, C, C++, ActionScript, or XAML” [Finding duplicate code in C#, VB.Net, ASPX, Ruby, Python, Java, C, C++, ActionScript, or XAML]

Using delegates to eliminate duplicate code

Here’s a simple technique you can use to easily eliminate duplicate code. Try not to let the word “delegates” scare you away from learning the technique and I’ll try to refrain from using the word “delegate” as much as possible.  I’ll start small and then work my way towards a more complex example that really demonstrates its power. …Continue reading “Using delegates to eliminate duplicate code” [Using delegates to eliminate duplicate code]

Using IDisposable objects responsibly – the easy way

How many times have you complained about how much repetitive code is required to properly dispose of objects in your code? How many times have you found yourself in a situation where you’re unsure whether or not you’re even supposed to dispose of an object in the first place?

I want to show you a technique which completely (or, at least, temporarily) avoids the need to bother yourself with those very important concerns. This is an extremely powerful technique which can be used for much more than dealing with IDisposable related issues, but that seems to be the scenario I use it on most often. …Continue reading “Using IDisposable objects responsibly – the easy way” [Using IDisposable objects responsibly – the easy way]

The current state of AlexDresko.com

I’m being forced to hold off a bit on writing anything really meaningful due to all of the other things involved with starting a new website like this. For example:

  • I’m not very happy with the registration process that is required for commenting on my posts. I think I want to leave registration as a requirement, but the process of commenting on a post needs to be streamlined.
  • I haven’t yet found an OpenId plug-in for WordPress that functions the way I want. OpenId is enabled on the site, but only nerds like myself would have any clue how to use it. What I really want is something like this:
  • The major search engines still don’t see my new site the way they should. If you search for “Alex Dresko”, I want AlexDresko.com to be the first result. At least Bing shows my site first when you search for “AlexDresko.com”.  I predict this is going to take a while, but there are still a lot of things I can do to make my site the most attractive result when people search for me.
  • For crying out loud, I don’t even have an “About Me” page yet! What about my resume and links to my social network profiles?  I bet you don’t even know what my purpose is for this site. And have you seen that default faveicon in the address bar? Gag me with a spoon! Yes, I just wrote that. The list of small stuff like this grows and shrinks daily and I’m going to keep hammering away at it until there’s nothing left to sweat.

So that’s a rough break down of what’s happening here right now.

I. Am. Not. Going. To. Give. Up. On. This.

The dark side of my job

On occasion, I get to perform such profound tasks as shifting columns to the right so the labels don’t wrap in our Employee Self Service application. Oh, and I think  I get to remove the “12” from the right column of the Box 12 data.


I just kinda figured the world would want to know that.

Something is better than nothing

In 2002, I purchased AlexDresko.com with the sole purpose of creating the most badass website to ever grace this beautiful planet. However, much like a mechanic who never has time to work on his own car, none of the dozen or so drastically different versions of AlexDresko.com I started on over the years ever got a chance to please the public.

But recently, I got tired of not having a voice on the internet. I have all these ideas for things to write about, but I’d always tell myself, “I don’t want to post anything until I can post it on my website, and I can’t post it on my website because my website isn’t ready, and my website isn’t ready because… SQUIRREL!”  Well enough is enough, man. I want  a place to call home and if some PHP *eeeeeek* blog system called WordPress is the way it’s got to happen, then so be it.

I’m going to stop beating myself up about not having everything exactly as I want it and move on. It’s a bitter pill to swallow, but I honestly feel like this is a hugely important step in the right direction. In my mind, there’s still a lot to do here, but something is better than nothing.

Wow. My first, real, suck-it-if-you-don’t-like-it blog post.