Saturday, December 6, 2008

Samsung Epix (SGH-i907) Review

image After a little more than a year with my Samsung SCH-i760 from Verizon Wireless I've finally done it.  I made the move to AT&T for my wireless carrier (the hard part) and picked up the Samsung Epix for my phone (the easy part). 

image

First of all let me say this, I realize that everyone in the world (wide web) seems to hate Windows Mobile, but I just don't get why?  Is it the idiot proof phone OS that you're used to?  Absolutely not.  Is it the worst piece of unusable garbage that anyone has ever seen?  Absolutely not.  I've been using it for a good while now and I was a pro within about 2 days. 

But I must digress...

The Epix is everything that I wanted in a phone.  The aforementioned Windows Mobile (6.1), a Qwerty keyboard (that I don't have to slide, twist, or touch a screen for), GPS (that is not completely crippled), and of course all of the usual stuff like syncing with Exhange Server, etc.  The really cool feature of this phone though is the "optical mouse" that replaces any D-Pad type navigation.  This is a really sweet feature as it really makes it feel much more like you actually have control over what your phone decides to open for once!  You basically just run your finger of this optical mouse in the center of your phone and a pointer floats around the screen.  It really is something worth trying.

I do miss the Picsel Browser that came with the i760 but to be honest I didn't really use it too much.  It's so much easier to get information from sources that are formatted for a Smart Phone anyway. 

They keyboard is great, I've got big fat ugly thumbs but I can still type pretty quickly on it.  It comes with AT&T Navigator (must pay like $10/month) which basically turns it into a sweet GPS system.  You can also use the "My Location" feature on Google Maps Mobile but I'm not sure if that works without you paying your subscription to the man.  (If not, I think I saw a post about how to enable it on a forum somewhere, so Google it)

Overall I have been extremely happy with this phone and I plan on keeping it until another sweeter phone that I can't live without comes along :-)  Plus, just look at how awesome this thing looks!  This picture doesn't do it any justice at all, you really need to pick one up at your local AT&T store and give it a test drive.

TireShop to be Re-Branded as Qwik P.O.S.?

Well as I stated before (yes, that was like 1.5 years ago, I know) TireShop development will continue, and has.  I've been working on taking the guts of TireShop (VB.NET 2.0, SQL Server Express 2005) and porting them over to what I think I'll call Qwik P.O.S. (Point of Sale), which will be a C# 3.5 application that uses LINQ for data access.  I don't know how long this will take me because I don't have quite the free time that I had when I originally worked on TireShop, but hopefully I can at least get a quick and dirty version out to the public fairly soon (like Q1 2009).

BTW: The reason that I brought down TireShop on the first place last year was because I received a Cease and Desist type letter from the people who apparently hold the "Trademark" that me calling my application TireShop was "Illegal" </sarcasm>.  I think it's all for the best though because to be honest there was never any part of the app that made it particularly fit for a tire store, I just made it that because I was originally writing it for some friends that own a local tire store.

Anyway... if any of you out there are still interested just keep an eye out here and on CodePlex.

Adobe Acrobat Kills Me

As should (hopefully) be evident by this site, I am a software developer.  One thing about being a software developer is that you notice when applications you use are poorly written.  Adobe Acrobat Reader is one of those highly annoying pieces of software.

Not only does the install try 5 times to trick you into installing the crappy Yahoo toolbar, but every freakin' time you try to open a PDF you first of all get this screen:

image

And then you get asked to install 50 Million Updates!!!  It is so annoying.  If I want to update the reader, I am highly capable of doing it myself.  If I can open the document I want to open with my current version, please let me do it and leave me alone!

</rant>

Thursday, January 10, 2008

Creating an XML Document by Serializing an Object

Let's say we need to create an XML document that looks something like this:

<?xml version="1.0" encoding="utf-8"?>
<
Form>
<
Name>Name</Name>
<
Description>Short Description</Description>
<
Variables>
<
Variable>
<
Name>VarName</Name>
<
Description>Short Description</Description>
<
Type>ListDataSource</Type>
<
Values>
<
Value>
<
ValueMember>1</ValueMember>
<
DisplayMember>New</DisplayMember>
</
Value>
<
Value>
<
ValueMember>2</ValueMember>
<
DisplayMember>Old</DisplayMember>
</
Value>
</
Values>
</
Variable>
</
Variables>
</
Form>



You get the picture, right?



Well, supposing we needed to create these over and over and over and these XML documents are fed into another program for processing.  Perfect time to use serialization, right?  Right.  But that is sometimes easier said that done.  Here's how I go about it.



Step 1: You will need a class the "root level," which in this case would be "FormLayout"  your class declaration would look like this:



[Serializable]
public class FormLayout




Step 2: Create a class for every element that has its own sub-elements.  In our example we would need to create a class for both "Variable" and "Value."  Their class declarations would look like this:



[Serializable]
public class Variable



[Serializable]
public class Value


Step 3: Starting with the highest (most indented?) elements, create a public property for each element under it.  In our case we would start by creating a public property for "ValueMember" and "DisplayMember" (encapsulating private variables of course):



public string ValueMember
{
get { return _valueMember; }
set { _valueMember = value; }
}

public string DisplayMember
{
get { return _displayMember; }
set { _displayMember = value; }
}


Continue with the rest of the classes in the same way...



Step 4: When you arrive at a "Repeating" element, make its declaration in its parent class as an array.  So for instance a "Variable" object would have a repeating list of "Value" elements, so we would create a public property in the "Variable" class that was an array of type "Value".  Like so:



public Value[] Values
{
get { return _values; }
set { _values = value; }
}




NOTE!!!!: It is important at this step to make sure your property names (in this case "Values" is the element that you want surrounding your repeating elements.  We named ours "Values" here because we want our XML Doc to look like:



<Values>




<Value>



...



</Value>



<Value>



...



</Value>




</Values>



Step 5: Mark all of your array properties with the



[XmlArrayItem(ElementName="Foo", Type=typeof(Bar)] attribute.  Where "Foo" is what you want your repeating elements to be, and Bar is the type of array.  In our case we want ElementName="Value" (see XML Snippet above) and Bar = Value.  So our Value[] array in our "Variable" class would look like this:



[XmlArrayItem(ElementName="Value", Type=typeof(Value))] 
public Value[] Values
{
get { return _values; }
set { _values = value; }
}


Serialize Me!



NOTE: You'll need a using System.Xml.Serialization and System.IO for this to work



public void Run()
{
FileStream _fileStream =
new FileStream("c:\file.xml", FileMode.Create);
FormLayout _formLayout = new FormLayout();
// Do something that would fill the FormLayout's properties...
XmlSerializer _xmlSerializer =
new XmlSerializer(typeof(FormLayout));
_xmlSerializer.Serialize(_fileStream, _formLayout);
}



Barring any complications, you should have an XML Document at "C:\file.xml" that follows the structure you need exactly.



Problems Foreseen:




  • Make sure every class is labeled public, otherwise the XmlSerializer can't see it.


  • Make sure every class has an empty constructor, even if you won't be using it.  This is what the XmlSerializer class uses to serialize and deserialize objects.


  • If for some reason you need to have public properties in the classes that you don't want to show up when serialized, mark them with the [XmlIgnore] attribute.

Wednesday, January 2, 2008

F# Programming Language

image Looks like Microsoft has been hard at work on the F# Programming Language, a functional programming language that works on the .NET framework.  Think Python on .NET (yes, I've seen IronPython).  The syntax is definitely not C# or VB like, and at first glance it looks very confusing -- but I think it would be fairly easy to pick up on. 

If I do end up using it, it will probably be for the same reasons I used Python for years; to do one-time tasks programmatically without creating an entire .NET solution.  When I was working help desk I used these "functional programming" tools religiously to read log files, etc.  Automating monotonous tasks is a great way to get started in programming.  Worked for me!

Viigo, the best Windows Mobile Application

image Let's face it, browsing the web on a windows mobile device stinks.  Most content isn't made to be viewed on such a small screen and the content that is... well it's usually not very good.

Picsel Browser certainly makes things a lot easier -- which is why it's quickly becoming one of my most used apps -- but it's still a pain to have to zoom in and out, etc.

Enter Viigo, an RSS aggregator for both Windows Mobile and Blackberry devices.  Viigo allows you to create a custom list of RSS Feeds which it updates automatically whenever you open Viigo.  You can choose your feeds from Viigo's built-in list of feeds (nicely categorized for ease of use) or by inputting your own feed URL's.

image

I've had my new Samsung SCH-i760 with Verizon service for a couple of months now and I must say, aside from the same battery woes that plague all smart phones I have been very impressed.  With Picsel Browser, Viigo, and the $45/month unlimited data plan you can accomplish quite a bit without being tethered to that laptop.

Friday, October 5, 2007

AJAX Control Toolkit

taskify_your_life Just for kicks I've been writing a new website (the previously mentioned taskify.net) and to a.) Increase the usability of the UI and b.) just learn more about ASP.NET AJAX, I've been implementing a lot of the AJAX controls into the site.  I've got to say, I think Microsoft really hit a home run on this one. 

I'll admit, at first it's very hard to grasp the concepts you must put in place when working with AJAX.NET, but much like .NET as a whole, once you figure out the patterns and the practices used to develop the tools, it's easy to pick up on all of the tools.  You'll never know how satisfying it is to refresh the data in a GridView without a full page refresh until you try it :-)

Head over to http://ajax.asp.net to check out the AJAX Extensions and the Control Toolkit.  You can also click the button below to see a live demo.

image
...but there are problems.  I have had major issues trying to work on an Ajax.net application on my laptop and desktop and syncing my changes.  My DLL references get randomly lost which then throws up an error everywhere that there is an AJAX tag.  A lot of my problems were fixed by changing the TagPrefix property on my ASPX pages to "Ajax" instead of "Asp".  Apparently there is an issue with using Asp as your prefix, but I'm still having issues when copying files over.
 
Usually removing the reference to the DLL and adding it back fixes the problem.  Oh bother.