Saturday, August 27, 2011

Atlantic Beach

Atlantic Beach Atlantic Beach welcomes new visitors and vacationers back with a hot sun and a wealth of activities. Enjoy the beautiful beaches and major attractions, while enjoying the historic beauty, heritage and amazing the area is known for. They say there are at least 101 things to do on the coast of crystal, and we say with certainty that it is true. Atlantic Ocean and the Intracoastal Waterway and rivers winding, water-activities include boat tours, cruises, scuba diving, Tours Ecology,...

Wednesday, August 17, 2011

How to query windows azure diagnostics for a time range?

Windows Azure Diagnostics stores data in Azure Table. Unfortunately, Azure Table only supports a single index, which means queries that don't use the index are dog slow.  In azure terminology, that index is the partition key, and Windows Azure Diagnostics sets the partition key on your behalf using the following formula:     0 + DateTime.Ticks You can generate the Partition key query in powershell for all logs after 7/15 by doing: PS C:\> "PartionKey gt '0$((Get-Date '2011/7/15').Ticks)'" PartionKey gt '0634462848000000000' For the curious, gt is the greater than...

Monday, August 8, 2011

F# and the immediate window

(This post is inspired from this Stack Overflow question)F# debugger integration is quite good, except for the immediate window. The immediate window requires C# style syntax, so calling F# functions is not intuitive. Below are recipes for the immediate window integrated into a console application. As always code can be found here: // Learn how to use the immediate window for F#.module Program= // To build, add a reference to Microsoft.CSharp. This is required for dynamic support in // the debugger. let allowDynamicToWorkFromImmediateWindowByLoadingCSharpBinders = Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags.BinaryOperationLogical...

Sunday, July 17, 2011

Using Ads to get free DropBox storage space.

(I did not "invent" this idea, someone told me about it. I figure you'll be interested in the experience, it was rather surprising for me.) Google makes money on ads, oodles and oodles of it. Up until today, I never "understood" the value of ads.  Today, I got a chance to use ads, here is my story: Dropbox is a storage service, if your friend signs up by clicking your referral URL, both you and your friend get 250MB of free storage up to 8GB of storage. This means if you can get 32 (8GB/250MB) friends to sign up you get lots of free storage. As you can imagine, I don't have 32 friends,...

Saturday, July 2, 2011

Using WinDBG/CDB and SOS to find a thread given a ManagedThreadId

CDB and SOS have more power than most people realize, I’ll use this post to show some some handy cdb/sos tricks while at the same answering the simple question of which thread a ManagedThreadId maps to. At the end of this post you’ll be able to: Map a ManagedThreadId to the correct thread ordinal Use CDB to convert from decimal to hex Pipe CDB commands through pipeline commands like findstr Full source for the simple app below can be found here. In the below app we want to figure which thread we’re running on so we can inspect the stack. internal class Program { ...

Sunday, June 26, 2011

Use Paint.Net to Highlight key areas in an image to get your point across

Earlier, I mentioned how important communication is to software engineering. A key tool in communication is being able to highlight portions of images.  For this task I use some basic features of Paint.Net.  In the below image I want to draw your attention to the name of the dress, and the name of the color of the dress. Without these highlighted regions, it's likely your eye wouldn't have picked up the points I wanted you to see. To perform these highlights in Paint.Net do the following:...

Saturday, June 25, 2011

Cool Tools: VirtuaWin

Virtual desktop software allow you have several desktops, and switch between them easily.  This is the equivalent of virtual memory, but for desktop real estate. Good virtual desktop software allows you to move windows between virtual desktops, and will have good usability including hot keys.  VirtuaWin is a great free virtual desktop app for windows,  go install it .  Once installed you should do the following:     Customize the notification area to always show the VirtuaWin Tray Icon    Use C-A-Right, C-A-Left, C-A-Up, C-A-Down to navigate between...

Saturday, June 18, 2011

Cool Tools: Paint.Net

Paint.Net is a nice compromise between advanced picture editing software, and picture editing software usable by humans. The biggest problem I had with paint.net is figuring out how to download it. In what I assume is an attempt to make advertising dollars, this website exists that make it impossible to download Paint.net without accidentally downloading crap.  Here's a direct paint.net download link.Update here are my usages of Paint.Net:Highlighting portions of an image Other you'd like to ...

Tuesday, May 10, 2011

Cool IEnumerable Tricks Part 1: GroupBy

IEnumerable, or what most people refer to as LINQ, has changed the way I program. If you love LINQ and you already fully understand this blog post, leave a comment with a topic you'd like me to post about. If you're not so comfortable with LINQ, try to follow along. This post will only take a few minutes, but may change the way you program for life. While we go through this blog post (and future posts in this series) make sure you understand how every function works, if you don't understand a function, you certainly won't understand the next function. Some of this stuff is hard to grasp and...

Monday, April 18, 2011

Leading by praise: How to use a carrot when you really want a stick.

Many naive leaders believe they have two ways to enact change in their followers.  The first way is "the carrot" aka praising good behavior. The second way is "the stick"  aka criticizing bad behavior.  In my experience, the stick is extremely ineffective. I'd say the only time the stick has any positive impact is when the follower doesn't realize she's doing something wrong, or how serious that wrong thing is.   The goal of this post is how to use a carrot when you want a stick.  First lets recall how to use a carrot effectively in general: Keep it timely, short,...

Friday, April 15, 2011

Google killed the video store

As a younger man I remember arguing with a co-worker about the death of local storage. Me: Who wants to store data themselves?  I can store all data in the cloud, where it will be preserved forever!Wiser co-worker: What incentive does this cloud have to keep your data? I'll keep my data on my local hard drive thank you very much!  8 years later my co-worker was  correct. I got the following letter from Google today:Later this month, hosted video content on Google Video will no longer be available for playback. <snip> We’ve added a Download button to the video status page,...

Sunday, April 3, 2011

Software Engineering “The Soft Skills”

To date, I've focused my blog on the "computer" parts of software engineering. However, as I've grown as a software engineer, one of my largest aha moments is the realization that software engineering is all about people. As such, I'll start posting articles dealing not just with computers, but also with communication, people leadership and management. These "people skills" are as important to a software engineer as the ability to crank out a design specification. For the hardcore among you that think people skills have nothing to do with software, consider th...

Friday, April 1, 2011

Impedance MisMatch: IEnumerable<T> to DataTable

I had to work with a class that consumed a System.DataTable today. DataTable is an old class that pre-dates generics in the CLR. DataTable carries typed data as an array of System.Object - double plus yuck! As you can imagine the code I use these days has compiler verified type safety by using IEnumerable everywhere. So how did I convert from my beloved IEnumerable to the yucky DataTable? With reflection of course! This simple method solves our problems: public static DataTable ToDataTable(IEnumerable rows){ var tableToReturn = new DataTable(); // get properties of T var properties =...

Saturday, March 19, 2011

Powershell script to enable windows to capture localhost traffic in wireshark

If you want to understand why the following scripts work read this post. Otherwise just paste the following into an elevated powershell window: Setup windows networking to allow localhost capturing in wireshark: # Find the network configuration that has the default gateway.$defaultAdapter = Get-WMIObject Win32_NetworkAdapterConfiguration | ? {$_.DefaultIPGateway}if (@($defaultAdapter).Length -ne 1) {throw "You don't have 1 default gateway, your network configuration is not supported" } # Route local IP address via the default gatewayroute add $defaultAdapter.IPAddress[0] $defaultAdapter.DefaultIPGatewayWrite-Host...

Thursday, March 17, 2011

How did we get a 53 byte packet size in ATM?

I'll be honest, I don't know squat about ATM, but I was having lunch with this fellow, and he told me the story of the 53 byte ATM packet.  You can find more details on Wikipedia, but here’s the synopsis: (Disclaimer: I’m not an expert in ATM; nor am I trying to teach you technical details about ATM networks; so I’ll hand wave and trade off accuracy for simplicity. For example, ATM does have variable sized packets which it divides into cells, and it is the cells which are 53 bytes long. However, since the closest thing to a cell in common networks is an Ethernet packet, I’ll simply refer...

Saturday, March 12, 2011

The cloud lets you evaluate the cost of performance optimizations

One of the things I love about cloud computing is you can put an honest price on computing time.  You can than balance the human engineering time required to optimize code (and often have more complex code) vs just paying for the cloud to do it.  The Zillow rent estimate post speaks to this brilliantly: We implemented the Rent Zestimation process as a software application taking input from Zillow databases and producing an output table with about 100 million rows. We deploy this software application into a production environment using Amazon Web Services (AWS) cloud.  The total...

Friday, March 11, 2011

Using LINQ to XML from F# (and a bit of duck typing for fun)

So you want to use XML from F#? here are the tips and tricks I discovered today to clear my roadblocks. Tip 1: Reference the System.XML assembly from FSI so you play with the REPL. To do this I add the #r in block comments at the top of the file  like so: (* Press Alt-' to send the below to the interpreter.#r @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Xml.Linq.dll"*)open System.Xml.LinqTip 2: F# doesn’t perform implicit conversions. Lets assume you’re translating the following C# code: var xelements = XElement.Parse("<myXML/>");var interestingElements = xelements.Descendants("myXML");The...

Wednesday, March 9, 2011

Supply, demand and the trackball market.

The author of this blog is a devout trackball man, and as any devout trackball man can tell you, it has been trying times for trackball users in the last few years. You see trackballs were never really in style, and no one has made a new trackball for a while.  It's so bad out there that one of my favorite trackballs now sells used for over 200$ and new for 500$.Crazier than that you can send away to get your trackball reconditioned on ebay, for a whopping 100$, where they'll clean it and put on a new cord.  Thankfully, there has been movement in the trackball market. Logitech released...

Monday, March 7, 2011

Decoding Ubuntu Version Numbers

I've always been fond of the Ubuntu code names, "breezy badger" and  "warty warthog" are some of my favorites. I know the code names are in alphabetical order, but I never understood how the Ubuntu folks got the version numbers. Why does 10.10 come after 10.04? Today I realized it's because the version numbers are release dates,  and releases are every April and October. So, this April's release "Natty Narwhal" will be 11.04.  Learn something new every day.  Oh and if you don't know what a  narwhal is,  it's  worth checking o...

Sunday, February 27, 2011

If you run firefox– install https everywhere now

I'll do a post later about session hijacking, firesheep and the evils of non https based websites. In the meantime, if you use firefox be sure to the run the https everywhere extension.  Without https everywhere I would be concerned about accessing my accounts on a public wifi network.  HTTPS Everywhere forces the browser to use https when accessing any website that supports both http and https. (By the way If you have a security question, or question on any of the topics I cover on my blog leave a comment and I’ll be happy to do a post answering your questions)...

Saturday, February 12, 2011

The 3 A's of security when buying a coffee

The three A's of security are  authorization, authentication and auditing.  While these A's apply to computer security they are also present in most transactions.  For example, lets look at what happens when Igor wants to buy a coffee:When Igor goes to buy a coffee with his credit card, the cashier starts by asking Igor for a Picture ID, then the cashier swipes Igor's card (which dials the head office to make sure there is money), finally a receipt isprinted. After all that Igor gets...

Saturday, January 29, 2011

Why do I keep getting exception code e0434352?

If you want to know how to debug CLR exceptions using cdb then read this post.Exception code e0434352 is the exception code used internally by the CLR to represent most exceptions(*). Regardless of if you throw a System.NullReferenceException or a System.ArgumentException in C#, you'll throw a SEH exception e0434352 under the covers.A fun way to validate this theory is to watch what happens to the CLR exceptions settings in cdb. Fire up cdb, and see the state of clr exceptions: 0:000> .shell -ci "sx" findstr clr clr - CLR exception - second-chance break - not handledclrn - CLR notification...

Sunday, January 23, 2011

Using NUnit to explore static field initialization

Given the following code:class Constants{ public static readonly Constants Instance = new Constants(); public static readonly string ApplicationName = "ig2600"; public readonly string CachedClassName; public Constants() { CachedClassName = GetQualifiedClassName("Constants"); } public static string GetQualifiedClassName(string className) { return string.Format("{0}::{1}", ApplicationName, className); }}Which of the below tests pass? [TestFixture]public class TestConstants{ [TestFixture] public class TestConstants { [Test] public void...

Saturday, January 22, 2011

Four Visual Studio Extensions You Need To Be Using

I spend a lot of time in Visual Studio and these extensions  make visual studio even more awesome.  If you haven't used VS to install  extensions, it's  trivial.  Follow along by doing: Tools -> Extension Manager -> Online Gallery -> Search Here are the extensions  I use, and strongly recommend you try. I have seen no adverse problems from running any of these extensions.  Here are the extensions I use: Productivity Power Tools (by Microsoft; free): Adds a Solution Navigator,  a better Solution Explorer,  and cool tabs features like pinning...

Monday, January 17, 2011

SSDs rock - but not for the reasons you think

I bit the bullet and picked up an SSD. It's expensive, but it had some surprising benefits. The normally quoted benefit is speed - which I really don't notice. Most operations went from some annoying amount of time, to some other annoying amount of time. I did notice two things:1) Silence:  I'm so used to hearing my laptop harddrive I couldn't figure out what I was missing - there is no more annoying grindings; clicking or whirring. 2) Coolness: SSD's run cooler - which means less spinning fan, which means more silenceIn theory the SSD should also help with the dropping (my last HDD...

Page 1 of 2312345Next