Apr
10
2013

Breaking the 1000ms Time-To-Glass mobile barrier

Ilya Grigorik is one of Google's engineers who is on the Make the Web Fast team. His talk on Breaking the 1000ms Time to Glass Mobile Barrier has some great tips:

Optimize Images:

 

This may mean making jpgs instead of pngs.

Mobile Latency:

 

The time it takes to send that first packet can eat up half-a-second!

Async scripts:

 

  Performance Rules

 

 

 

 Implications

 

 

 Bottom Line

One Request. Inline. Defer the rest.

Apr
7
2013

2013 WASP-B Trapshoot League Schedule

2013 WASP-B Schedule

Here is the 2013 WASP-B schedule. You can come shoot at any one of these even if that’s the only shoot you decide to try.

April 7: Nebraska City

April 21: Valley

May 5: Ashland

June 2: Lincoln T&S

July 7: Papillion

August 18: Bellevue

September 15: Finals at Nebraska City

All club shoots start at 8am and close at 3pm. Finals start at 8am and close at 2pm.

Mar
16
2013

Nebraska Code Camp 3

This year at Nebraska Code Camp for the first time there was an extra day of hands-on labs. I signed up for Advanced Machine Learning and a Single Page App (SPA) lab that was cancelled at the last minute, so instead I crashed Adam Grocholski's Windows 8 lab where we had a lot of fun just playing around.

I'm really proud to work for Five Nines Technology Group who was a Platinum Sponsor this year - we are really excited about the programming community here in Nebraska and enjoy contributing to its vibrancy.

 

Machine Learning Notes

My favorite part of labs are always the great resources for continued learning I get from the instructors. I took the machine learning lab because it was out of my comfort zone, but it is something that I find could be quite useful. For instance, a potential customer recently asked us to write an algorithm that compared athletes across the nation and rank them by some test results.

So, here are the resources Luke Amdor shared with us:

Some of the topics he covered were:

 

Windows 8 Notes

This was a full-day lab, but I only caught the last half. The first half they did some hands-on labs at MSDN; here are some example labs you can do.

We took a look at many of the Azure offerings and talked about differences between mobile services and cloud services and networking and active directory. I totally encourage you to sign up for a free 90-day trial!

We also had a lot of fun with game programming. Adam's favorite is TouchDevelop - a really cool game and app programming tool that is free and lets you share code snips. 

Feb
27
2013

How To Set a Modified Date in Entity Framework

Just saw Julie Lerman show a slick way to set the modified date on an entity by overriding the SaveChanges() on a DbContext:

 

 

Other good tips:

  • Download the EF PowerTools for a nice plug in that lets you rt-click on the class that implements DbContext and select EF\View Entity Data Model (read only) => to get a relational diagram of how EF is going to create your database before you do a migration.

 

  • In your models, use both the navigation property and the foreign key to increase performance (w/out FK, EF has to go figure out what ID to put in there), to make some object graph management more intuitive for adding/updating or just figuring out if that navigation property exists without invoking lazy loading.

 

  • For lookup-lists, you can improve performance by not tracking the entity state:

_context.MyEntity.AsNoTracking().OrderBy(a=>a.Name).ToList();

When you do the AsNoTracking, combine it with the previous tip so that EF doesn't add a new MyEntity when you save the parent each time:

parent.MyEntityId = Id; // instead of parent.MyEntity = myEntity <- that might cause EF to save a new (duplicate) myEntity to the database

 

Sep
25
2012

Subtle MVC, Razor, Membership Bug

I encountered a really frustrating bug yesterday when I tried to hit my MVC project on the QA server, and it turns out it manifested itself in several telltale ways:

  1. The QA server (IIS 7) reported 403 Forbidden for my login page.  Could not load anything.
  2. My local machine (IIS 7 Express) would not show the ValidationSummary on the login page
  3. My local machine would not let me navigate to the forgot password page, or any [Allow Anonymous] pages other than the login page, unless I logged in;
  4. after logging into my local machine, and then everything worked fine, and I could get to the [Allow Anonymous] pages
  5. My local machine would not show the company name text in the banner until I logged in

The last sign was finally what clicked – I didn’t realize these all were related until I noticed that one.  On my _layout.cshtml page, I have the following:

@{ Html.RenderAction("_CompanyName", "CompanyName"); }

The site is a multi-tenant application that has a url like: {company}.domain.com.  The above calls into an action that takes that {company} and looks up the company name in the repository, then displays that name in the banner.

The problem was the _CompanyName action on the CompanyNameController was not marked as [Allow Anonymous].  IIS Express was able to let this slide, but IIS did not!

Sep
5
2012

#HDC12–Building a Dream Team

This afternoon I attended the Build a Dream Team hands-on lab presented by Chris Carlson and Gabe Romero of Aureus Group.  They presented tips on how to hire and retain great team members.  We’re currently looking for some top talent at Five Nines, so the timing was great.

I learned that we could improve our interview process by creating a performance profile that focuses on what the candidate will have to do to succeed in the job.  What will be the objectives?  What projects will they work on?  What responsibilities will they be assigned? How long will they have to reach each objective?  Defining the future of what they are going to need to do and making sure they are qualified to do that is more important than arbitrarily specifying that they need XYZ certification or a degree in ABC.

For the first hour we talked about hiring and the book “Hire With Your Head” by Lou Adler.  Chris was a big fan of this guy’s work, which I haven’t read before, but a lot of the tenants she talked about from his work rang true for me, too.  For example, when writing an ad for a job, focus on what the candidate will have to do, not what experience they have to already have.  Make the candidate a customer – try to sell them on your company, and make sure they leave with a positive experience even if they don’t get an interview.  Try to limit bias and emotions by asking the same narrow, quantitative type questions to each candidate, and then scoring them on some pre-defined categories (having the book would help here, it comes with templates and extras).  Also, be careful of initial reactions to a candidate – it may be best to take a 30min break before you talk to anyone about the evaluation of the candidate.  Concentrate on a candidate’s past performance – what have they done to improve the environment at past jobs?  If nothing, then don’t expect them to hit the high notes in the future, either. 

When checking references, validate the candidate’s strengths with specific examples.   Would that reference hire them or work with them again?  How does the candidate compare to others they know at the same level?

The next hour or two we talked about accountability and engagement.  Gabe described the difference between responsibility and accountability by explaining that responsibilities are assigned, or given to you, but only you can be accountable to get the results done.  He talked about how engaging with your team is critically important to help understand what they are experiencing, what are their frustrations and aspirations and goals, and to give feed back and reinforcement.

I think our AppDev group is doing a very good job of accountability and engagement.  We practice an agile approach to all of our work, and each of us is held accountable each day at our daily stand-up meeting where we quickly review what we said we were going to get done yesterday, what got done, and what we’re doing today.  You can see instantly that someone got off track, and no one wastes more than half a day going down a rabbit hole before they get a chance to come up for some air and help from the team.  Our iterations are time-boxed, so it is obvious at the end of the 2-weeks whether we got done what we had planned or not.  After each iteration, we do a retrospective (Good/Could be better/Improvements) that has proven to be such a powerful agent of change that I’ve been thinking about how to apply it to my personal life.

We have weekly one-on-one meetings with our Director where we talk about whatever is going on with us in the environment.  It’s a great chance to vent (constructively, of course) and get some feedback.  We build trust as a team because we know our opinions matter and we really are being listened to. 

We occasionally have strategy meetings where we talk about the course of our group and what direction we will concentrate on in the future.  Each of us brings our ideas to the table during those meetings, and all thoughts are welcome.

Sep
5
2012

#HDC12–Building Win8 Apps with JavaScript

I’d like to thank HDC12, Jeff Brand and Matt Milner for a great hands-on lab today on building Win8 apps with JavaScript.  We worked through a demo project that queried Twitter for tweets based on a search string, then presented the results in a nice grid.  Each cell in the grid had the author’s picture and the tweet.

Jeff made the demo project available via Git: https://github.com/spartyspartan/TweetScan

Resources on Win8: http://goo.gl/Wu4NH

Here are a few things you need to know about developing a win8 RT app on the JS stack (some of these would apply to a xaml app on WinRT, too):

  1. You can't reference js from a CDN or internet; has to be local.  The app has to be able to run disconnected, and has to be run in one security context
  2. In un-snapped view, the app layout needs to scroll horizontally, not vertically
  3. The app is suspended when it is not visible.  After a while, if resources get low, Win8 will terminate your app and not tell you! So, on receiving the suspend event, assume you are/will be terminated because there is no event for terminated and go ahead and save state or whatever you need to do.
  4. You have to have win8 & vs12 to develop the apps – they use WinJs which relies on WinRT
  5. The app has to support snap view – when the app gets snapped to the side.  At that point, it needs to either scroll vertically or handle the change gracefully.  For instance, a game might just put up a “paused” screen in that case.
  6. The most common architecture will probably be a single-page-app.  You can use js namespaces to avoid script collissions.
  7. Make sure to check the project’s manifest in the package settings to set the capabilities and available declarations so that the app can access more than just the Internet.
  8. Blend visual designer is definitely worth checking out.  It renders the app in an engine that includes a javascript sandbox.
  9. You can hook into the Search/Share/Settings charms to set up how your app will interact with these
  10. You can add custom buttons to the app bar – be sure to check the metro design guidelines for where to put global vs context-sensitive tools.
  11. The app store reviews all apps.  If you are selling yours, there is a tiered pricing structure starting at $1.99.  MS takes 30% of sales up to $25k, and 20% after.  If you don’t sell the app, it can be added to the store for free and MS provides advertising tools (or you can use others), and you can still use a payment gateway in the app without having to pay MS.  So, the only time you pay MS is if the app is for sale.  There are very easy ways to make it a trial software for 7/14/30 days (e.g.) and MS will handle users trying to trick the trial by uninstall/reinstall or other means.
  12. When an app is off-screen, it gets 0 CPU.  A device can have up to 7 apps that are running background processes (think email, IM), and the user will choose which of their apps win if there are >7, so don’t assume your background polling process will be running if your app is suspended.  You can also do live tiles for the start screen that use push notifications or toast notifications, and this is a free service that MS provides.  For some rare cases, like a skype app, there are ways to keep a connection open even if the device is locked.
  13. You can have multiple tiles for one app – think a separate tile for each stock you are tracking in the financial app.
Jun
28
2012

Public Access to Target Shooting in Lancaster County (near Lincoln), Nebraska

I like going to the indoor range, Thunder Alley, in Lincoln.  I hear that the Izaak Walton range just east of Lincoln is a great place, too.  But, sometimes I just want to shoot outdoors.

I’ve looked at the NRD website, and app, and cross-referenced with the Nebraska Game and Parks Outdoors site and their Guide to Hunting on Public Lands, 2011 and Public Access Atlas then checked which nearby areas allow at least some target shooting on a map I copied from Nebraska Sportsman’s Atlas, 1995.  I’ve also put a request for information into the Southeast Wildlife Manager listed in the Guide to Hunting Public Lands for more information.

There are only a few spots in Lancaster County, NE, that allow target shooting.  I haven’t ground-truthed any of these yet, but evidently there will be signs posted in areas that are off limits: Wildwood, Branched Oak, Wagon Train, Stagecoach, Olive Creek, and Teal Lake:


View Target Shooting in Lancaster County, NE in a larger map

Jun
27
2012

LDNUG June 2012–Entrepreneur

 
 

Abraham Chavez (@RedPlasticSky) presented at the Lincoln Dot Net Users’ Group tonight about his experience starting his own business – http://mexrico.com.

Abraham’s one of those few people you meet who you might call a unique thinker because he makes an effort to form his own ideas and opinions and is interested in countering common wisdom.  He draws on his experience and on the seemingly many books and articles he reads to develop a way of thinking about life and work at a philosophical level, and then has the will to live that philosophy – a rare combination.

The presentation covered lessons learned in how to start a small unfunded business while you are still working 8-5 at your day job as a software developer.  Here are some of the ideas that he learned or that worked for him:

Pivot – be ready to change your business as you learn the market.  You may design something for one audience and find that it is not wanted there, but with a change of direction can be very desirable in another market.  It’s a good idea to anticipate this and to not try to do all of your design up front so that you don’t become too rigid.

Local – we usually think of putting our software or product out on the national market so that it reaches more people.  Abraham turned that idea on it’s head – there is less competition locally, and you can very easily network in person.  You can market your business as a local thing, and that really does lend a big hand.  Plus, if there’s a national company that does something similar, they may just buy you out so that they can capture the market in your town.

Snowball – sometimes starting small and simple, then pivoting, can lead to a snowball effect that takes you farther than you could ever imagine.  Think about how apple made an iPod->iPhone->iPad.

Constraints – have designers block?  Give yourself some constraints to boost your creativity.  Abraham gave a great example of using a grid with three dots on it.  Use the constraint that drawing your logo has to fit on that grid and has to include those three dots.  Giving your mind somewhere to start is so much better than looking at a blank page.

Reduce Complexity – be zen-like in all things: don’t give your customers too many options, it’s paralyzing (again, constraints are good).  If you don’t need something, get rid of it or don’t do it.  I really liked how Abraham’s business, mexrico, just did one thing: make and deliver tamales.  He started with 7 types, and reduced that to three.  You had to order 6 at a time.  It was so easy for customers – there’s no psychological weight – and it’s like the business model for Caine’s chicken fingers, it’s just drop-dead simple.  Man, I really want some tamales, now.

Out-Source – you can out-source and off-shore everything that isn’t core to your business and that you’re not great at.  Abraham shared a couple of his favorites that he used to get logo and graphic designs, and video, too: http://fiverr.com and http://asksunday.com.

And finally, for funding?  Abraham swears by contract employment.  He’s been able to find renewable 1-year contracts that pay very well and include benefits, although, he warns it isn’t necessarily a fun path, but it can provide you with the cash you need to get going.

May
5
2012

No One Knows They Want Visible Solids in Their Spaghetti Sauce

I just listened to a wonderful talk by Malcolm Gladwell on how people think and what makes them happy.  The most important part to me as a software consultant, is that you can’t just ask people what they want – they won’t be able to tell you.  As a bonus, this talk explains why you have to choose from 14 varieties of vinegar and 47 varieties of cheese when you go to the supermarket.

Malcolm tells the story of how Dr. Moskowitz showed that there is human variability in human preferences.  If you ask most people what kind of coffee they like, you’ll hear an overwhelming number of people say something like “Dark, bold, strong”, when actually a third of people really prefer weak, milky coffee.

Dr. Moskowitz has shown that if you poll people for what they think they want, and then design your product around that feedback, you’ll end up with a sub-par product.  But, if you can separate out your data into targeted clusters and deliver a few variations, your variations will be raised in quality as experienced by the consumers or customers of that variation.

Creative Commons License