1 Comments

The “app gap” is something you hear about constantly with Windows Phone, that I start to wonder if it’s just the easy go-to explaination for why Windows Phone is only holding 2% of the market. There are a few other bigger reasons that I can think of, but I have yet to hit a single app that I’ve “needed” other than your typical mom-and-pop shop app.

That is… until now.

There is not a single, generic, media streaming app in the Windows Phone store for Windows 10 Mobile. Sure, you’ve got Plex, but that requires a Plex server and account. There’s also Emby and Subsonic8, but again those require a dedicated Emby or Subsonic server.

I want a generic DNLA media player, and I just can’t seem to find one.

So what does a developer do when he can’t find what he wants? He makes his own.

That’s what I’m going to do – and what’s worse is I know NOTHING about DNLA or media streaming or if it’s even possible. I also haven’t started going down the path of building Universal Windows Apps yet. I’ve only worked on Silverlight/WP8.1 apps.

Since I’m going to be learning how to do this from the ground up, why not blog about it in the mean time? This will be good motivation to keep the blog alive and we’ll hopefully get a decent app out of it in the end.

Whelp… here we go.

0 Comments

I love deal-a-day sites. It gives me a quick break from the day to see some ridiculous deal on a ridiculous item that I don't need yet feel the need to buy.

Probably the biggest and well known deal-a-day site is woot.com. Although, to be fair, since they were bought out by Amazon, they're more of a one-hundred-deals-per-day-but-sometimes-a-week-or-until-sold-out site.

Either way, checking the daily deals is my thing and figured that since woot just released a beta API, I'd take a crack and creating a Windows Phone app to feed my daily deal-a-day fix satisfied. It's a no-frills, no-ads, give-it-to-you-straight kind of app.

Announcing: Wootinator v1.0.0.0

This version simply lists the daily deals from each of the main woot sub-sites (home, wine, kids, tools, etc), shows you details on the product, and gives you the option to buy.

It's not fancy by any means, but it works and works for what I want.

In the near future I plan to add support for push notifications for woot-offs and live tile support.

Give it a download, let me know what you think.

3 Comments
            A friend of mine recently tweeted a list of 10 "great" C# developer tips. I put purposely put the word great in quotes because, while there are some useful tips presented in this post, there is one that gets under my skin whenever anyone mentions it:
   
    The dreaded Tuple.
   
The Tuple was first introduced in .Net 4.0 and was meant to be a quick helper/replacement to creating very light-weight POCO classes (for those of you who hate acronyms, POCO stands for "Plain Old C# Object").
   
Say you have a method that needs to return an object with 2 string properties and 1 int property. You would create an object like this:
                
        public class Employee
        {
            public string FirstName { get; set; }
            public string LastName { get; set; }
            public int YearsEmployed { get; set; }
        }
       
Then your method signature would look like:
    
        public Employee GetEmployee(int employeeId) { ... }
       
As an answer to creating all of these little classes everywhere, the Tuple was created. Instead of creating tens to hundreds of POCO classes for your application, you could simply have a method signature like this:
    
        public Tuple<string, string, int> GetEmployee(int employeeId) { ... }
   
Awesome, right?!
   
NO. NEVER!
   
Here are the top 3 reasons I HATE Tuples and you should too:

1. It promotes laziness.

The only reason you are using the Tuple is because you're lazy. You don't want to have to right click -> Add... -> Class... give it a name, type in your property names, reference it in your other projects, properly create an n-tier architecture, or, god forbid, think about IOC or DI (inversion of control and dependency injection for you initialism haters). Explicit coding be damned, you're better then having to do that. Laziness is good, if the output of it is faster or better... but in this case it's not either... leading me to:

2. It is a pain for consumers of your code.

Pop quiz: Given the following property in this class definition, tell me what the 3 items of the tuple represent.

public class Dog   
{
    public Tuple<string, string, string> Owner { get; set; }
}

I'll give you a minute... go ahead... ... got your answer?
    
If you said, "First Name", "Last Name", "Address" - you're wrong. I meant for it to be "Last Name", "First Name", "Eye Color". How could you have possibly known that? If you start using the Dog class with your assumption, but all the code I've written is on my intent, then we have a horrible data conflict. By saving yourself 30 seconds in not creating an explicit class, you have wasted at least 2 minutes of ever other developers' time. Which leads me to my last point...

3. You have to over document for it to be useful

Fine, you don't want to listen to me and you still want to use the Tuple. Hopefully you are documenting your code given your horrible choice so that when I, as a consumer of your code, come along and see Tuple<string, string>, I at least see some comments like:
       
///<summary>
///An owner where the Tuple has Item1: First Name and Item2: Last Name
///</summary>
    
However, I am a big fan of self-documenting code because it saves me time. There is no reason to add a comment like this:   
       
///<summary>
/// The first name
///</summary>
public string FirstName { get; set; }

But with your decision to use the Tuple, you now have to document EVERYTHING in order for it to make sense. Have you really saved yourself any time?   

Where are Tuples helpful?

Tuples are really helpful in prototype code. Sometimes you just need a quick way to represent related data in a code base you know you're not going to ship anywhere. Tuple it up wherever you want, just make sure that when it comes to actually writing the code, you get rid of them.
    
Tuples are also helpful in locally scoped code. If inside of a single method you want to use a Tuple to load up some data from a file before shoving it into a different return object, by all means. If I can see the local definition in my code window and its assignments, then I'm not lost. 
    
I'd love to hear what you think on the topic. Feel free to leave a comment here or on my twitter account.

0 Comments
I have a long running joke with a friend about how when developing in C# you should add an extra semicolon to the end of the line... because it increases performance. 

Well, after digging into some IL, it turns out I wasn't wrong. 


no, i'm not serious

Moral of the story, always make fun of your simple programming mistakes. If you get too caught up in being perfect, being a developer will stop being exciting.

1 Comments

By now you've hopefully heard about and understood the new features launched today by the Visual Studio team at the Visual Studio 2013 launch event. Among time savers like sync'd environment across machines, live preview scrolling (though, why is your class that big to begin with), and peek into definition, you probably heard the most about Visual Studio Online.

Productivity = Yay!

Getting light weight apps into the cloud is not a new trend. Google did it with their Google Apps, Microsoft did it with Office365 and now Visual Studio Online. With this move, Microsoft will be taking development shops to a whole new level, both with convenience and cost savings.

Have you ever found yourself with a production level issue on your site that required you to wake up in the middle of the night? Groggy and sleepy you head for your desktop computer, wait for it to power on, VPN into your corporate network, RDP into your work computer or Azure instance, check on some logs, hop into your Visual Studio, make the changes, and fire off a hot fix. We've been there... and there stinks.

In comes Visual Studio Online and the potential it brings. Let's take that same scenario. You're still groggy and sleep, but this time you lean over and grab your tablet which, if you're like me, is right next to the bed. A few logins later and you've got the problem and the fix all through your browser.

Downsize = Yay!

There is one thing about being a developer that I hate - the size of my laptop. It's not even a laptop anymore, it's a portable desktop. I need the power. I'm a spoiled little brat with the amazing dev desktop machines that I have and I expect nothing less than when I sit down at my laptop to write code.

The laptop is huge and heavy, and now that I travel more I hate it! You ever try to crack open a 17" laptop in an airplane? Don't.

One specific tool stood out to me from the VS2013 online announcement. Online IDE. This means that I don't need a powerhouse of a laptop for fast compile times anymore, because I'll just compile it in the cloud. If I want to pick up my tablet and start cracking away at some code, I can!

I went to school to get a bachelors degree in art. Every professor I had encouraged us to keep a sketchbook with us all the time because you'll never know when an idea will hit you, or a burst of creativity will consume you. Is software development really that much different? A cloud based IDE gives us the ability to keep our sketch pads light and always with us.