Skip to content

A Summer Internship at Oddly Even

September 29, 2015

I spent my summer as an intern working on mobile development which is making phones apps, in sunny California, for Status Not Quo. The feelings I had when I had left to move to California were that of excitement and also terror since I had not traveled far from home in Illinois on my own. Although, being out in California was scary and I missed my family back home. I wouldn’t be the same person I am at this time without it. When I say I would not be the same person I mean that figuratively because working has expanded my knowledge and has grown me as a person.

I got to experience a wide spectrum of so many parts of mobile development and programming. I know, you mean what did you get to experience and I will tell you I got to learn about parts of programming I did not know even exist. Such as, a RESTful Web Service. Yes, I know I was like “What is that? Let me go Google that real quick. Could you explain it?” the simple answer is yes I can explain it. But well no. Also, I got to work with mobile devices sensors so I can create an accurate location tracking. I had no interest in do anything with location based technology before but now I want to work more with it. Then, I work with storing information on phones which to be honest isn’t that interesting but it is important because if you can hold on to something how can you expect something to run again and again. How could a phone hold onto what people had previously select if you did not store information and data, it can’t. I mean these are some interesting thing especially to someone starting out who might not have seen them until later on after joining the workforce with a degree, but I got to make them work together.

Now, that was just one project. Also, I am kept busy because I always have something to do. There is a project and each project is different. I have gotten the chance to update and modify apps with my work. Other times I get to test other people’s work which is something I enjoy. There is feeling that things are going to work out because before I get a chance the apps are tested by their maker. However, nothing is perfect and it takes many revisions to get an app to an acceptable state. That has ended up being true while building an app.

There was a project was to verify that X was a problem and was it easy to fix. Well that project turned into terror; however, I learned several things from another’s mistake. Like the importance of naming and not having every part of a project call the rest of the project. That project was like a Russian nesting doll that never ended. Currently, that is still being worked on and I am not for which I am happy for because that project gave me a headache.

Now, all good things have to an end and I am grateful for the chance and opportunity to learn and grow with Status Not Quo and Oddly Even. Now, I am excited by joining their ranks to continue to grow, learn, and enjoy the wonderful California weather.

Collaborative Consumtion – Sharing Economies – What’s the big deal?

September 24, 2015

The phrase, “There’s an app for that”, has never been more true than in today’s market .  This is not surprising given the adoption rate of mobile devices and the fact that mobile exceeds PC internet usage(1) and drives nearly half of e-commerce traffic (2).  But did you know that there’s an app to find someone who will come clean out your garage (Task Rabbit) , do your laundry (Washio) or shop and deliver your groceries (Instacart)?  This emerging trend is not because these companies have created an awesome app or have a great understanding of technology.  No, it is because they had an idea, saw there was a specific need that could be filled in a better way than the current market offering, and most importantly, they excel at providing the consumer with a great streamlined customer experience and that in turn translates into customer happiness and loyalty.  When customers are happy, they also tend to share their experiences with others and this then leads to more customers.

This “new phenomenon” is referred to as Collaborative Consumption, Sharing Economies, or Collaborative Economies.  It’s not just a new way of buying and selling, it’s actually a departure back to the way things were done in the past – people are gettiing goods and services from other people who have the skills or time to do something you can’t or don’t prefer to do rather than going through a middle man (or company).  The difference is the technologies of the collaborative economy makes finding these other people possible.

People have shifted from merely “consumers” and are now acting as lenders, producers, sellers, etc.  This has opened up a myriad of opportunity.  Now a family traveling to a resort for vacation doesn’t have to book 2 or 3 rooms at the resort hotel for $300 per room per night, they can rent someone’s home for $300 for the entire weekend.  Instead of having to ask your parents (again) if you can borrow money, you can now take out a loan from strangers and not have to pay 100% interest (or more).  And the list goes on…

The difference from the past is that instead of having one handymen in your community who can fix your roof, there are many, many more people offering these services and accessible using the apps to help you find them.  But how do you know that the goods or services you are getting are of good quality?  Opponents would argue that because there is no regulation to these collaborative economies, the quality of service can’t be known.  However, these goods and services are being judged by previous users “rating” their experience.  Success in this collaborative economy is all about convenience and customer service.

So how can business compete in this new emerging market?  One of the advantages that established companies have over a new start up is that if they have a trusted brand that consumers are likely to continue to use as long as the companies are able to provide these products and services in a way that is as convenient, cost effective, and provides a comparable customer experience as their collaborative economy counterpart.  If business embrace the model of on-demand sharing and collaboration, they can build on the consumer loyalty they have worked so hard to gain.  However, as this new collaborative economy trend continues to grow, established companies have a short time frame to modify their business model to provide this ease of access and excellent customer experience to ensure they have won the loyalty of their customers.  Otherwise, they will be left behind.

For more information on how you can streamline your business, contact us at Status Not Quo.


Using Comma Delimited Lists in SQL Server

September 1, 2015

Have you ever wanted to take a list of values that are delimited by a comma (or any other character) and find records that match the individual items in your list? It doesn’t work very well at all. I have a quick and easy way to do it using a user defined function.

It is fairly easy to deal with XML in SQL Server these days so if we can convert the delimited list into XML we can easily insert the XML into a table and then join on it.

So all our function needs to do is accept a list, a delimiter (we will make it default to a comma). Then it can convert the list into XML, insert it into the table that the function returns and we have our solution:

create function [dbo].[fnIterativeListToTable] (
@list nvarchar(max),
@delimiter nchar(1) = N’,’)
returns @tbl table (listpos int identity(1, 1) NOT NULL,
str varchar(4000),
nstr nvarchar(2000))

declare @xml xml

select @xml = CAST(‘<Item>’+ REPLACE(@list,@delimiter,'</Item><Item>’)+ ‘</Item>’ as xml)
insert into @tbl
select t.value(‘.’, ‘varchar(4000)’) as str,
t.value(‘.’, ‘nvarchar(2000)’) as nstr
from @xml.nodes(‘/Item’) as x(t)

Now, let’s see how we can use this function. First, let’s create a new table and insert some data into it so we can use it test our new function (I randomly generated a few names for us to use):

create table SampleData(Id int identity(1,1),Value varchar(50))

insert into SampleData(Value) values

Now lets build a comma delimited list that includes a few names in the table:

declare @list varchar(100)
set @list = ‘Wendi,Luke,Mel,Cythia’

Finally, all we need to do is join our new table to our function and pass in the list:

select s.*
from SampleData s
inner join dbo.fnIterativeListToTableXml(@list, default) l
on s.Value = l.str

If we run our query we will get the records for only the names that are in our list. Alternatively, you could also write the same query using a where statement:

select *
from SampleData s
where Value in (select str from dbo.fnIterativeListToTableXml(@list, default))

There you have it. Let me know if you have any thoughts or questions about this process. Especially let me know if you have a better way to handle delimited lists in SQL server.


Communication and the email black hole

September 1, 2015

We’ve all had those days, or sometimes weeks, where your inbox starts backing up because you just don’t have any time to even check it, let alone respond.  Your inbox becomes a black hole – emails come in, but nothing gets out.  But that unread email lurks at the back of your mind, increasing your stress level in the midst of a push to meet a deadline or complete a project.  It pokes at you when you least expect it – what if there’s an email about the project you missed?  Or a request from an exec?  Or… fill in your nightmare du jour.  And when you do start going through the backlog, it actually can get worse.  Progressively more irate emails requesting the same info.  Missed opportunities to work on a cool new project, or win a new business deal.  But when you’re maxed out and have to focus on the immediate project, how can you handle that inbox as well?

Have a plan – and execute it.

  • Create a few follow-up folders that begin with an underscore so they stay at the top of your folder list. You’ll use these to triage your inbox, so keep that in mind as you name them.  Here are some examples:
    1. Urgent – needs immediate response
    2. Respond by date ##/##/####, usually 3-5 business days out
    3. Response needed but not date sensitive
    4. Read when you have spare time
  • Set aside 10 – 15 minutes once or twice a day, and schedule it with a reminder set. Then schedule an hour once a week in addition to those sessions.  This is the only time you’re going to open your email each day, and no cheating and looking at your phone!
  • During your daily scheduled time, quickly skim each new email, and assign it to one of the folders as appropriate. Use the hour block to address the follow-ups needed from items 4 and 5 below.
  • For each email in the urgent folder, send a reply (standardize this and copy and paste it as needed!) stating that you’re in the midst of a critical project and ask if a response by ##/##/#### (insert your desired date) would be acceptable. If not, ask them to provide the latest acceptable date, and end with your thanks. Most people will work with you as long as you’re communicating with them. It’s the lack of response that results in frustration – that info sucking email black hole L
  • For quick requests filed to the respond by date folder, again use a standardized reply, but let them you know you’ve received their request and will respond appropriate within 3 business days/5 business days/# business days. And extend your thanks for their patience. Keep that social machinery running smoothly!
  • For the non-date-sensitive requests, a quick response that you’ve received the email and will follow up with them after a given date (two days after your project is due?)
  • Everything else goes to the read when convenient folder, is filed as informational, or deleted if irrelevant.

It’s amazing what a simple acknowledgement of receipt, with a stated plan to address the request does for the sender’s attitude.  Especially when you follow up per your stated plan. You’re not so stressed, the email senders aren’t frustrated, and the critical items get addressed. It’s no fun being on either side of that email black hole event horizon – so let’s avoid having it even come into existence!  Good luck!

String vs Inline String vs Shared String in Open XML

August 25, 2015

While working on a spreadsheet generation process, I came across three different ways to specify a string cell value in Open XML. While that is confusing enough, if you look up on MSDN, this is all you see:

SharedString Shared String. When the item is serialized out as xml, its value is “s”.
String String. When the item is serialized out as xml, its value is “str”.
InlineString Inline String. When the item is serialized out as xml, its value is “inlineStr”.


Obviously, that does not give any information on why I should choose one type over the rest. So, for people like me that’s looking for a basic difference, here’s a summary of what each type is:


String datatype works best if you want to store a function in a cell.





The v element stores formula value that was generated when the formula executed the last time. So, if there is a value on v, that value is directly read. If not, Open XML reader computes the value based on the formula and stores it for future use. The formula itself is stored as text.

Shared String

When you use a Shared String to represent your string, the size of the file is drastically reduced, especially if it has a lot of repeating strings. This is because, when a string is added, it checks if it is already present and if it does, only a reference to that original string is added. If it is not present, then it is added to the file, reference stored in the cell and that reference is used later on when that string appears again.

<c r=”A1″ t=”s”>

The v element holds the reference.

Inline String

Inline String allows you to directly save a text without having to save the reference in its place. To create a cell with text you use the ‘is’ element, which stands for inline-string. An InlineString is saved as rich text.

<c r=”A0″>  <is><t> Test String </t></is></c>

This is a much more easier way to code and easy to read. However, for data containing strings that repeat, this becomes inefficient.

That’s just the basic difference. Pick your option based on performance vs readability.

Nugget of Wisdom

July 26, 2015

True prosperity is the result of well placed confidence in ourselves and our fellow man.

~ Benjamin Burt

Creating Left Joins and Aggregates using Entity Framwork

July 21, 2015

One of the deficiencies that I run into from time to time in Entity Framework (EF) is accommodating parent – child relationships where the list of child elements is empty, unless I define that relationship in the Entity class itself.

For example, consider these two classes:

public class Order {
 public int OrderId { get; set; }
 public int CustomerId { get;set; }
 public string Name { get; set; }
public class OrderDetail {
 public int OrderDetailId {get;set;}
 public int OrderId {get;set;}
 public string ProductCode { get; set;}

In EF, I can create a relationship between these by modifying the Order class like this:

public class Order {
 public int OrderId { get; set; }
 public int CustomerId { get; set; }
 public string Name { get; set; }
 public List<OrderDetail> OrderDetails { get; set; }

Then, when I’m using EF to select from these tables, EF will automatically include my join and get the OrderDetails for me, as long as I do something like this:

var list = _dc.Orders

This setup will give me all of the orders, even if the OrderDetails collection is empty, but if it’s not empty I’ll get the details as well, which is great.

The trouble I find sometimes is that I may want to create a join that works just like this, but that doesn’t require me to define the relationship in the Entity class definition. For example, continue considering the classes above, but now add this one into the mix:

public class Customer {
 public int CustomerId {get;set;}
 public string Name { get; set; }
 public bool IsActive { get; set; }

Suppose that I want to get all of the active customers, and a count of all of the orders each customer has. Sure, I could modify the Customer Entity class to include a reference to the Order class, but if I do that it means that EF will need to consider that relationship (and make a decision about whether it wants to include a query to get the Order results) every time I access my Customer class. Let’s suppose that that produces more overhead than I want in this case, because there are lots of times when I will want to access the Customer entity without respect for whether there are any orders. My first reaction is that I can just write a join EF statement, like this:

var list = _dc.Customers
 .Join(_dc.Orders, c => c.CustomerId, o => o.CustomerId, (c, o) => new { Customer = c, Order = o }
 .Where(x => x.Customer.IsActive)
 .GroupBy(x => new { x.Customer.CustomerId, x.Customer.Name }
 .Select(x => new { x.Key.CustomerId, x.Key.Name, OrderCount = x.Count() })

This will give me what I’m looking for (the customer fields for active Customers, plus a new field called “OrderCount” that counts the number of Order records associated with my Customer), but it has a major drawback – I’ll only get results when a record already exists in the Order table. Any customers that haven’t created an Order yet won’t be returned, because they’re failing the Inner join condition. This can be a major problem, but I’m glad to say that with EF 5 an answer to this scenario was introduced. Here’s what the answer looks like:

var list = _dc.Customers
 .GroupJoin(_dc.Orders, c => c.CustomerId, o => o.CustomerId, (c, o) => new { Customer = c, Orders = o }
 .Where(x => x.Customer.IsActive)
 .Select(x => new { x.Customer.CustomerId, x.Customer.Name, OrderCount = x.Orders.Count() })

The important points to notice here are that the .Join keyword was replaced with .GroupJoin, and that we used a .DefaultIfEmpty statement after the .Where clause.

.GroupJoin is a keyword that works just like a regular join, but instead of creating results that exist at the same hierarchical level as the first table, it creates records that are gathered into in an IEnumerable<T> as children of the parent. In other words, the same sort of relationship that is created when we modify our Entity classes like we did with the Order and OrderDetail classes back at the beginning. This means that we don’t need to use a .GroupBy statement because the results are already organized into a tiered anonymous type. That’s very cool!

.DefaultIfEmpty is a keyword that instructs EF to create that relationship and return an IEnumerable even if the child table has no results. In other words, it changes your SQL from INNER JOIN to LEFT JOIN. In this case, since I’m using an aggregate of the child table (.Count), I will get 0 in my result set if no rows were found, or if there were records in the Order table, I’ll get the count. That’s exactly what I was looking for. Note also that .DefaultIfEmpty comes after the .Where keyword, so it will be evaluated after any restrictions are placed on the query.

Here is the same query, but this time it outputs into a List of a pre-defined classe called “CustomerOrder”, which includes both an aggregate of the orders (OrderCount) and a List<Order> of the orders themselves (Orders):

var list = _dc.Customers
 .GroupJoin(_dc.Orders, c => c.CustomerId, o => o.CustomerId, (c, o) => new { Customer = c, Orders = o }
 .Where(x => x.Customer.IsActive)
 .Select(x => new CustomerOrder() {
    CustomerId = x.Customer.Id,
    Name = x.Customer.Name,
    OrderCount = x.Orders.Count(),
    Orders = x.Orders.ToList()

Now my variable contains a List<CustomerOrder>, which I can return from my data layer, and I have a strongly-typed set of objects to use for my business logic.  Perfect!


Get every new post delivered to your Inbox.

Join 339 other followers