Syndicated via RSS From: http://www.drdobbs.com
Archive for January, 2010
I’m so excited, I just can’t hide it!
And neither could Coatesy!
That’s right, I’m being crated up and shipped back home to Terra Australis for a week of Windows Azure goodness from the 22nd of Feb to the 25th of Feb.
Please check-out Coatesy’s blog for all the deets and I look forward to seeing everyone very soon!
Woo hoo! :)
Syndicated via RSS From: http://blogs.msdn.com/b/davidlem/
Syndicated via RSS From: http://www.drdobbs.com
With Apple poised to finally confirm its long-rumored tablet device on Wednesday, Amazon.com is going on the offensive–as Apple muscles in on its Kindle ereader territory, the online retail giant is targeting the App Store in kind, releasing a software development kit offering coders the means to build and upload “active content” for the Kindle platform. According to Amazon, the Kindle Development Kit will include access to programming interfaces, tools and documentation for both the 6-inch Kindle and 9.7-inch Kindle DX, enabling creation of content that leverages Kindle hallmarks like seamless and invisible 3G wireless delivery, high-resolution electronic paper display and battery life extending as long as seven days with wireless activated. Amazon will kick off a Kindle Development Kit beta trial next month (details here), and adds that firms including Handmark, EA Mobile and Sonic Boom are already creating content for the platform.
The challenge facing Amazon is the same one looming in front of all of Apple’s rivals: How to lure developers away from the iPhone, especially with the promise of the Apple tablet on the horizon. Amazon does not report Kindle sales totals, although analysts project the number sold at between 1.5 million and 2 million–by contrast, Apple announced Monday that it sold 8.7 million iPhones and 21 million iPods in Q1 2010 alone. Jeff Smith, CEO of Smule–the startup behind App Store bestsellers including I Am T-Pain and Ocarina–tells BusinessWeek that while it might cost 10 percent of the original development outlay of an iPhone app to fashion a new version for the tablet, it would probably cost as much as another 70 percent to rewrite the software for the Kindle. Developing for Amazon would essentially mean “rethinking how I design applications from the start,” Smith adds.
But the biggest obstacle facing Amazon could be the quirks inherent in the Kindle concept. As the Kindle Development Kit homepage points out, Kindles are not smartphones: Users don’t pay a monthly wireless fee or sign up for an annual service contract. Which means Kindle applications must be priced to cover the associated costs of downloads and ongoing usage–according to Amazon, that translates to content delivery fees of 15 cents per megabyte. (Applications smaller than 1MB that use less than 100KB per user per month may be offered free to consumers–Amazon will cover any wireless costs associated with delivery and maintenance.) On top of that, Kindle applications will face an upper size limit of 100MB; apps larger than 10MB will not be delivered over-the-air, meaning consumers must instead download content from the Kindle Store to a computer and transfer the app to their Kindle via USB. For niche developers and content providers like educational software designers and comic book publishers, the chance to reach the core Kindle demographic could be a game-changer, but most programmers may have to change up too much of their own game to make the opportunity worth pursuing. -Jason
Booyah attracted attention months before releasing its first mobile application: In spring 2009, the firm landed $4.5 million
in Series A funding via Kleiner Perkins Caufield & Byers’ iFund, the $100 million investment initiative created to support ideas and products for the iPhone and iPod touch platform. KPCB’s instincts proved correct when Booyah launched its first iPhone title MyTown in December–the location-based social gaming application already boasts more than 500,000 users playing the game an average of more than 30 minutes a day, reaching number seven on the App Store’s top free apps list. FierceDeveloper speaks to Booyah co-founder and CEO Keith Lee about playing in the real world and the importance of originality.
Mobile software developer Bolt Creative announced its Pocket God has now sold more than 2 million copies via Apple’s App Store–according to the firm, it’s the first premium iPhone and iPod touch application to reach the 2 million sales benchmark. First released in January 2009, the 99-cent Pocket God–a casual game giving users the opportunity to rule their own remote island, complete with deity-like powers–has released close to 30 free updates in the last 12 months; Bolt Creative reports the title has moved as many as 53,000 units in a single day, and downloads topped 100,000 per week throughout the holiday season.
For more on the Pocket God milestone:
- read this release
Microsoft briefly posted a Windows Mobile 6.5 software development kit to its Microsoft Download Center website last week, removing the SDK within a matter of hours. According to ZDNet, the WinMo 6.5 SDK appeared on Jan. 22, and remained online long enough for some bloggers and developers to download the kit–some speculate Microsoft pulled the download because it reportedly contains widget tools and emulators for Windows Mobile 6.5.3, an interim build said to add support for “touchable tiles” as well as enhanced gesture support, a revamped address book and updated start menu placement.
With the web buzzing about the SDK post, Microsoft on Monday issued the following statement: “”On Friday, January 22nd Microsoft prematurely posted a version of an upcoming Windows Mobile 6.5 SDK to a public facing Web page. While the SDK was not announced or promoted, it was discovered and generated questions from the community. The beta SDK has since been removed and will be reposted once final testing has been conducted. We apologize for any inconvenience.”
The WinMo 6.5 SDK snafu seems likely to fuel increased speculation over Microsoft’s mobile roadmap and the long-promised release of Windows Mobile 7. While some sources report the software giant will formally announce the revamped OS during February’s Mobile World Congress 2010 event in Barcelona, others indicate it is now delayed until 2011.
For more on the WinMo 6.5 SDK release:
- read this ZDNet article
Related articles:
Microsoft to discontinue Mobile2Market program
Microsoft adopting chassis strategy for Windows Mobile 7
A number of Windows Mobile developers are venting their frustration with Microsoft over Windows Marketplace for Mobile payment delays, posting messages on the Windows Mobile Developer Center forum that indicate they are owed substantial sums derived from premium application downloads via the storefront. According to this thread, multiple WinMo developers are awaiting payment following extended delays, some dating back to October 2009 and in several cases totaling thousands of dollars–on its Windows Mobile for Developers FAQ, Microsoft pledges to pay within 15 to 30 days for credit card billing, and within 90 to 120 days for mobile operator billing. “If you’re a developer, you will be paid 70 percent of all application sale prices as your revenue share,” the FAQ states. “At the end of the month, Microsoft will total all transactions for your application sales on which we were able to collect money. Your 70 percent revenue share is then applied to the total and if that equals or exceeds $200 USD we will initiate an Electronic Funds Transfer payment to your bank account.”
Microsoft’s Windows Marketplace for Mobile product manager Mihir Rao responded directly to the Windows Mobile Developer Center thread, stating that Microsoft completed its first round of payouts in December and plans a second round this month. According to Rao, there appears to be confusion around Dashboard status updates indicating whether a developer is eligible for payout, suggesting that some programmers are currently ineligible due to missing bank or tax information, or because the $200 threshold has not been met. However, multiple developers responded to Rao’s post to report their Dashboard has read “Eligible for revenue payout” since last fall.
“I see my explanation of the ‘Eligible for revenue payout’ status has raised more questions than it has answered,” Rao wrote in a post dated Jan. 21. “I am going to get some more details on this particular dashboard status to provide further clarification. I will post back with more details by the end of this week, so stay tuned.”
For more on the Windows Marketplace payment delays:
- read this Ars Technica article
Related articles:
Windows Marketplace extends to WinMo 6.0 and 6.1
Microsoft adds online app sales to Windows Marketplace
Smartphone shipments worldwide will increase to 390 million units by 2013–a compound annual growth rate of 20.9 percent over the 2009-2013 forecast period in question–according to research firm IDC. While IDC predicts the Symbian operating system will retain its global leadership position over that time thanks largely to Nokia’s dominance in markets outside of the U.S., Android is expected to experience faster growth than any of its rivals, leaping from 2008 shipments of 690,000 to 68 million units by 2013, a CAGR of 150.4 percent. IDC adds Android will benefit from the growing footprint of handset vendors supporting the platform, and will finish second to Symbian in shipments by 2013.
On the flipside, IDC forecasts Linux and Palm’s webOS shipments will struggle throughout the forecast period. Shipments of Linux-powered devices are expected to trend down due to greater emphasis on the Android platform, although some vendors will continue to support the platform–as for webOS, IDC believes the operating system will grow steadily, but will ultimately capture only narrow market share as a result of limited deployment and operator availability.
For more on the IDC forecast:
- read this release
Related articles:
Android explodes into the consumer consciousness
Over half of Android developers dissatisfied with app profits
Let’s take a quick look at the object keyword first. I’m not going to talk a lot about it because it’s been around since C# 1.0. This keyword is nothing more than a shortcut for System.Object, which is the root type in the C# class hierarchy. (However, as Eric Lippert pointed out in his blog post, not everything in C# derives from object.) This is a powerful mechanism, since you can assign almost any value to instances of this type.
Here is a short example that demonstrates some of the benefits and problems of using the object keyword.
Console.WriteLine(obj.GetType());
// Prints System.Int32 because
// this is the type of the value stored in this object.
// A compiler error, because
// at compile time the type of obj is System.Object.
// obj = obj + 10;
// You need to explicitly cast obj to a necessary type.
obj = (int)obj + 10;
// However, this does not mean that you are really safe.
// You can cast to a wrong type
// and the compiler will not detect it.
// Here you get an exception at run time,
// because obj is an integer, not a string.
// obj = (string)obj + 10;
// You also get a run-time exception
// if you cast to a wrong numeric type,
// even if there is an implicit conversion in the language.
// obj = (double)obj + 10;
As you can see, although obj stores an integer, the compiler does not let you to perform any mathematical operations without a cast. It may look like casting helps you to ensure that you really have an integer, but it doesn’t. You can cast to a completely different type and the compiler will not detect it. As a result, you get a run-time exception.
So you have to perform an explicit cast that does not guarantee anything just because the compiler doesn’t let you to run your program without a cast.
Here is where the new dynamic keyword in C# 4.0 comes in. It tells the compiler not to enforce additional rules upon your code.
Console.WriteLine(dyn.GetType());
// Same as "object".
// Prints System.Int32 because
// this is the type of the value stored in this object.
// No compiler error, because
// the compiler does not try to identify
// the type of the dynamic object at compile time.
dyn = dyn + 10;
// Also, this operation will succeed for all numeric
// or other types that support a “+” operation.
dyn = 10.0;
dyn = dyn + 10;
dyn = "10";
dyn = dyn + 10;
This is one of the main differences between object and dynamic – with dynamic you tell the compiler that the type of an object can be known only at run time, and the compiler doesn’t try to interfere. As a result, you can write less code. And I want to emphasize that this is no more dangerous than using the original object keyword. However, it is not less dangerous either, so all the type-checking techniques that you need to use when operating with objects (such as reflection) have to be used for dynamic objects as well.
The next question that often comes up is something like the following: “Since a dynamic object can be anything and the compiler doesn’t check what it is, does it mean that you can pass a dynamic object to my unsuspecting method/system and make it crash?”
Let’s assume we have a simple method.
{
Console.WriteLine(arg);
}
Now let’s look at how you can pass a dynamic object to it.
// You get an exception at run time here.
Print(dyn);
As you can see, although the compiler allows you to pass a dynamic object to your method, your method never gets this object if it has a wrong type. An exception is thrown before the method is actually called. The only way you can pass a dynamic object to your method is if it contains a necessary value, in this case, a string.
Print(dyn);
Again, this is not that much different from the behavior you get with the object keyword.
// Doesn't compile.
//Print(obj);
// Compiles, but there is an exception at run time.
//Print((string)obj);
// This code works because obj is now a string,
// but you still need a cast.
obj = "10";
Print((string)obj);
Some people say that it isn’t hard to read (int)obj, so why bother with dynamic? Well, there are situations when you have to perform so many cast operations that it makes your code almost unreadable. There are also situations when a simple cast is not enough and you have to call reflection methods, such as InvokeMember or GetProperties. A good example here is COM interop, which is why it was modified to use the new dynamic features (for more information, look at this “how-to”.)
Also, the dynamic keyword and dynamic language runtime enable many scenarios that were either impossible or difficult to do before, including interoperation with dynamic languages. I have highlighted couple of such scenarios earlier on this blog: Introducing ExpandoObject and Creating Wrappers with DynamicObject.
You may also want to take a look at the MSDN walkthrough that shows how you can call an IronPython library from C# and Visual Basic, and a really cool presentation, Using Dynamic Languages to Build Scriptable Applications, by Dino Viehland. Another good presentation that shows some examples and explains the design principles behind this feature is Dynamic Binding in C# 4 by Mads Torgersen.
The conclusion is that there is no need to fear that someone can break your code by using dynamic features. It is no more (and again, no less) dangerous than the object keyword.
So, if you often use the object keyword and have to perform a lot of casting and/or use reflection to call methods and properties of objects, you probably should take a look at the dynamic keyword. In some cases it’s more convenient than object and with less code to write.
Syndicated via RSS From: http://blogs.msdn.com/b/csharpfaq/