Programming
Binary Serialization in C#
3Let me preface this by saying I’m not sure the information here is correct. Prior to this, I have not worked with binary serialization. I serialized to XML or JSON because it was easy to transfer and was human readable. But binary really makes sense for what I’m doing now. I deserialize JSON into objects from a Web API. To make the app run faster, I cache the deserialized objects. Many of them could be cached for quite awhile because they rarely change. So, persistent cache storage is good but I need to keep the cache footprint small on disk More >
Mono for Android List Optimization
0One of the big things I’ve worked on lately is optimization of the Android app I’m working on for my employer. I want the app to run at its absolute full potential using every realistic optimization I can.
One of the most-frequently-used components in Android applications are ListViews. Android ListViews are good and bad. They are good in that, if you do it properly, they handle view recycling and can be pretty efficient. They are bad in that the abstraction is so leaky that 90% of the so-called tutorials and examples I’ve seen More >
Construct 2: Kicking the Tires
2I love playing with GameDev tools such as engines, frameworks/libraries, game creators and new languages. I’ve been a big advocate, fan and user of FlatRedBall for some time as you may know.
Today, while reading up on something totally unrelated, I saw a reference to an HTML5 game maker called Creator2. Curious, I read a little about it and decided to play with it this weekend.
I’ve been pleasantly surprised by how awesome this tool actually is. While I don’t think it’s suitable for a super-feature-rich and complex game, it is a More >
Understanding Threading and Why Android Feels Sluggish
0User Interface Performance: Why it Matters
Fact: All but the most hardcore Android fanboys agree that even the best devices feel laggy compared to the snappy iOS UI.
This is not speculation or a debatable point. If you believe that the Android User Interface (UI) is as consistently responsive as the iOS UI, you are simply incorrect. It’s SCIENCE! There are specific reasons for this which I’m about to discuss but first let’s talk about why a laggy UI is a problem.
UI stands for User Interface but it may as well stand for User Experience. For most users, if More >
Best Practice: Passing Types to Methods
1Here’s a question that maybe a C# Guru can weigh in on…
I abstracted some Activity-launching code that I use everywhere into a method on the base Activity that all of my Activities inherit from:
protected void LaunchActivity<T>(string url) {
Intent activity = new Intent(this, typeof(T));
if (url != null) {
activity.PutExtra("ApiUrl", url);
}
StartActivity(activity);
}
// makes starting activities really easy:
LaunchActivity<MyActivityType>("http://myApiUrl.com");
I think this method could also be defined like this:
protected void LaunchActivity(Type t, string url) {
Intent activity = new Intent(this, t);
if (url != null) {
activity.PutExtra("ApiUrl", url);
}
StartActivity(activity);
}
//
What’s Up at MS?
3I’m a cross-platform developer, not a “Microsoft-dedicated” developer. I work in a variety of languages on a variety of platforms as you will know if you have read any of my other posts. I develop video games when I’m motivated and don’t have freelance web work. This year I worked on an Xbox game and released a WP7 game. As I look to next year and decide what types of projects I get into beyond freelance, I’m evaluating what’s out there.
Lately there has been a lot of [gamedev-specific] news about Windows 8, the roadmap of XNA, what’s up with More >
Sorting Standard Sizes
0Last week I was finishing up some stuff to do with size/color selection on the product detail “page” of the Android app I’m building. This turned out to be pretty complicated. The overall solution is bigger than the scope of this post but basically, the detail page should display all of the colors and sizes available for the product. If the customer selects a color it should filter the other lists, somehow marking the sizes that are sold out for that color. It should do the same thing for sizes, filtering colors if the customer selects a size. It More >
TPL vs Async, What’s the difference?
0
Prior to working on a MonoDroid project for my employer, I had near-zero experience with multi-threaded programming. On mobile devices, if you hang the UI up for more than a few seconds (varies by platform), the OS will tell the user your app is unresponsive and offer to close it. Thus, it becomes very important to move potentially-long-running process out of the UI thread and I have been forced to dive into multi-threading whether I want to or not
Earlier this year, before I started More >
Grimwar 2 via CodeIgniter
0I built Grimwar.com in 2009 because my friends played Magic the Gathering frequently and talked a lot about a collection manager that would allow them to see each others’ collections, save deck builds and create wishlists. It started as a simple database of cards but slowly grew into a fairly-full-featured site. The problem is, it started without any real vision for UX or code and thus things were just tacked on as fast as they could when people had new feature requests. It became a pain in the rear More >
Mono for Android Tips
0I’m currently working on an Android shopping application for my employer that is built in .NET using Mono for Android by Xamarin. You don’t need to click any of those links, they’re just for reference
This is a collection of random hints, tips, observations that I have encountered while working on this project. If you’re wondering whether to use Mono in your project some of these comments may give you an idea what it’s like to work in Mono for Android.