Showing posts with label Windows Store Apps. Show all posts
Showing posts with label Windows Store Apps. Show all posts

Friday, June 20, 2014

DataBinding 101 – AppCamp Materials

On June 20, 2014, I will be presenting on DataBinding for your applications at 2014 AppCamp Tampa.

And here are the completed demo files

 

-twb

Wednesday, May 21, 2014

Last Mile Tips – Live at Tampa WP8 User Group Meeting

On May 20, 2014, I’ll be speaking along with Kelvin McDaniel and Nick Randolf to talk getting through the last mile on your application.

Here are the slides from the presentation:

-twb

Tuesday, May 20, 2014

Last Mile #6 – Start Putting in Graphics/Icons ASAP

When you build your application, don’t ignore the icons and graphics.  You may need some specialized graphics or icons for your application but in a lot of cases you just need some simple graphics for a button or similar.  You may be tempted to just use the same icon throughout the app  imagewith the idea to come back later and add some graphics all at ones.  I’ve found it’s better just to take a two-three minute detour to go ahead and find an applicable graphic add it to the app, see how it looks/feels as you use the app and add additional features and potentially replace it if necessary. 

One place I’ve found a great source of professional icons is from Syncfusion Metro Studio, what I like about their icons is that they have an app where you can search on icons by category and name.  When you find one you like you can customize the color, size and border.  They also go really well with a metro application.

-twb

Last Mile Tip #5 – Be Realistic

Ok, folks, this is ALWAYS they one the gets me when building a new application (or for that matter doing chores around the house).  A couple years ago, I started a weekend project to remodel our bathroom.  Originally I was disappointed that one of the fixtures I wanted to instimageall wasn’t available for a week, well it turned out I wasn’t ready for that fixture for about two months.  The project was much bigger than I had though of, I only pictured the rough work that needed to be done and didn’t think about any of the detail work or for that matter anything going wrong. 

You may have a great idea for an app you want to right, but be realistic.  If you have your unity license and setout to create the next Halo or Call of Duty app, well I would ask you to think twice.  Does that mean you shouldn’t sit down at your computer, open VS.NET and and start hacking away at something like that?  Maybe not, there are a lot of projects I work on that I  enter into with the knowledge that I’m not going to ship the app.  There are two primary reasons I do this.  First off is programming and solving problems is fun, second off and more importantly I consider this type of work “practice”.  When I commit to do something for a client that I’m going to get paid for, I don’t expect them to pay me to do “research” I want them to pay me to do “development”.  Just as with anything the more you practice the better you get, I just don’t like practicing on software that will go into production, so I try to keep my goals on software I ship realistic while I shoot for the moon on my fun stuff.

-twb

Sunday, May 4, 2014

Last Mile Quick Tips #4 – Keep Your Code Clean

As your creating your masterpiece take care to ensure that you keep your code clean.  One ByteMaster’s golden rules of software development imageis the only code that is guaranteed to not cause you problems in the long run is code that doesn’t exists.  What exactly does this mean?  use some basic principles, like DRY, Do not Repeat Yourself, refactor your code often, put some thought into your naming conventions, rather than commenting out unused code, just remove it.  If you do need to comment it out for some reason, add some comments as to why it’s commented out.  Although a personal preference, I try to keep my methods under about 20 lines, sometimes as little as 3-5 line.  Pick a standard naming coding convention and keep it consistent across your application.  One of my pet-peeves – if you are helping someone on an application, and they use a different naming convention, a you just know that yours is superior *cough* *cough*, swallow your pride and just following the app’s naming convention. 

Of course these are just touching on some of the basics, but there is a tendency when creating apps to think of them as something you can just hack together and publish, rather than something you need to put some thought into and engineer them properly.  Once you get to the final phase of your project if you don’t keep your code clean, you’ll be spending more time then you want just fighting with stupid stuff, tracking down edge cases and generally not having much fun.

-twb

ListBox.ScrollIntoView Not Working

Fought with this one for about 2 hours…hope this post will help someone not waste their time.

Working in a Windows 8.1 store app, I had a command responses from my quad come to my machine over a USB port that I wanted to behave as a auto-scrolling console.

As lines of text came in, I put them in an ObservableCollection<String> that was associated with the ItemsSource on the ListBox.

Then had the code:

DeviceConsole.UpdateLayout();
DeviceConsole.ScrollIntoView(_receivedItems.Last());

Where _receivedItems was my ObservableCollection<String>.

This didn’t work, after much troubleshooting, I realized that the some of the command responses where duplicated.  For example, “OK” was returned when I told it to do something.  This appeared many times in the list, so when _receivedItems.Last() returned “OK”, and ScrollIntoView(item) was called with “OK”, it simply looked for a string match for “OK”, not the particular instance of the string that was the last item in the list, and it just picked the first instance in the list and didn’t scroll it into view.

FIX

Once I determined what was happening, the fix was obvious.  I simply created a class similar to:

public class CommandResponses
{
     public int Index {get; set;}
     public String Respone {get; set:}
}

And used an instance of this class in my observable collection ObservableCollection<String> used to populated the ListBox.  As soon as I did this, DeviceConsole.ScrollIntoView(_receivedItems.Last()); worked like a champ!

This was on a Windows 8.1 store app, but I suspect the same scenarios apply to ListBoxs on other platforms as well

-twb

Friday, March 28, 2014

.NET Microframeworks Group and Windows Phone/Windows Store Apps

In our continuing serious on building an autonomous vehicle, in April we will let you robot start talking to the real world!

On April 15, I’ll be doing a session on demonstrating how to remotely control and talk to your robot from a Windows Phone and Windows Store application by adding a Bluetooth module to you robot.  And then setup some very basic protocols to control your robot with a Windows Phone and Windows 8 application. 

You'll be able to get the Bluetooth device from Amazon: 

http://www.amazon.com/Arduino-Wireless-Bluetooth-Transceiver-Module/dp/B0093XAV4U/ref=sr_1_1?ie=UTF8&qid=1395938505&sr=8-1&keywords=Bluetooth+module

To use this Bluetooth module, you'll need to configure it, to do so, you'll need some sort of USB to Serial Port Connector such as:

http://www.amazon.com/SunFounder-Arduino-Program-Download-Mega2560/dp/B00GD6GE6O/ref=sr_1_10?ie=UTF8&qid=1395938602&sr=8-10&keywords=USB+232

You can sign up at:

http://www.meetup.com/Tampa-Bay-NET-Microframeworks-Developer-Group/events/173765942/

-twb

Thursday, March 20, 2014

Last Mile Tip #3 – Beware of the Boring Stuff

You know how it is when you are building your application, you have the key features you need to build to make your app come to life.  In a lot of cases these key features are something new and challenging.  If you’re like most developers you are motivated by doing something new and challenging so you start on those parts of the app.  Then after you put a little time into it, things start coming together, problems start getting solved.but as you do that, there are a number of small less exciting things that need to be done to complete the app.  You know how to do it, or it really doesn’t seem that exciting so you say to yourself, yeah, I know how to do that, once I get the primary functionality in the app working I’ll come back and add in that “forgotten password” feature or that regular expression on the email address feature, or something like that.  Sound familiar?

In a lot of cases, you get the primary functionality and think you are ready to ship and then all those little extra boring tasks need to be completed.  Hopefully you read my earlier post on making lists, if you do this as you go, once you get to this point you won’t be fooling yourself in thinking, just one more thing and I can submit, you’ll have a relatively complete list of work and should be able to gauge the effort ahead of you.  As I also mentioned in that earlier post, sometimes when you come across that sort of thing, you should just shift gears a little and knock out some of the smaller items.  It may not seem exciting at the time, but will dramatically shorten your final to-do list.  Another thing that I found helpful is to start reusing assets from other projects, ideally this would be in the form of a common library you use among all your mobile projects, but even just the cut-and-paste refactoring method is better than redeveloping the wheel each time.  Also where possible if you can use an existing application frameworks they may already have dealt with a considerable number of those boring yet necessary tasks.

Last but not least, just being aware of the fact that as a typical developer you are probably deferring all the “boring” tedious development tasks as you go might be enough to change your behavior and make your last mile go a little quicker. 

-twb

Saturday, March 15, 2014

Last Mile Tip #2 – Start Using Your App as Soon as Possible

No, I don’t mean testing on your emulator.  I mean use your app in the real world as a real user would.  In software engineering terms this concept is called “Dog-Fooding”.

This is one of my top big tips that I have and is also related to something else I’ve learned about creating apps, if you are just creating an app you aren’t going to be using in your day-to-day activities or a game you wouldn’t enjoy playing, you may want to consider the premise of your app and try to find something that is a better match. 

So assuming it’s an app you will indeed use, or a game you enjoy playing, as soon as reasonably possible get it off your development machine and onto your phone or tablet you use on a daily basis and USE THE APP!  I can’t stress this enough, once you start using the app, you’ll find little things that don’t really make sense or are obviously broken but you just never come across during development.  You’ll have to trust me on this one, but for a fitness app I’m building right now, I’m using it every time I get exercise and it’s really surprising how quickly I’m moving through the last mile.

-twb

Last Mile Tip #1 – Just “Knock-Out” or Keep a List of the “Easy Stuff”

As you are building your app, there are many times that you come across something that needs to be done, but seems so easy it’s really a distraction of getting the primary functionality done.

Of course you don’t want to be pulled in too many directions while you’re building a large app, but these “Little/Easy Tasks” can really add up or uncover some other major work you don’t realize that you’ll need to do.

My strategy for dealing with these sorts of things is if they are easy and I think I’ll be able to get done in under 5 minutes, I’ll just go ahead and try to complete.  These aren’t things that you know you’ll have do like “Create A Forgot Password Feature”, this is stuff like “Need a clearer icon for XYZ” or “Add validation for emails addresses to sign up screen”.  If I know it will take a little while but I still consider it some of the “Easy Stuff” I’ll get to once everything else is done, I put in a list.  Of course there are lots of tools out there to help with this, but if you just want to get started, create a simple Misc.txt or Todo.txt as a text file in your solution or project. 

Obviously you can get fairly advanced how you compile and organize our lists, but get started, today, I mean right now on the application you are working on.  If you come across something easy you want to defer, write it down, you’ll be surprised how quickly this list adds up.

Bonus points for keeping this under revision control with the rest of your source files.

-twb

Last Mile Tips

We have a very exciting event coming this spring for Windows Phone that I’ll share more about in the future.  However in preparation for this, I’m going to be compiling and releasing a set of “Last Mile Tips” to help you release your Windows Phone or Windows Store Apps quicker and easier.

If you’ve ever written any sort of mobile application, you know that it’s pretty easy to get to the 90% mark of being done, right?  Isn’t it?  That’s the fun part where you get stuff working and the app starts to come alive.  During that 90% you come across a number of things that are just easy and will get done relatively quickly so you just skip them and continue on with the fun part of making progress and making your app come alive.

Then what happens?  You hit the last 10% and BOOM!  Death by a thousand cuts, you spend the next 90% of your time on the project finishing up those “last simple and easy things”.  If this has happened to you, welcome to the club, you’re not alone!

I certainly don’t have all the answers here to tame the last mile, but I do have a number of things that have worked.  Join me over the next few months as I share my experience as well as things I’m learning as I make a concerted to solve this last mile problem.

As we go forward, if you have any tips or tricks that you use, just add them as a comment and I might just add them as post (giving you credit of course).

Stay tuned, things are about to get exciting!

-twb