cpp-netlib: Moving Away from Header-Only

Posted in C++ on December 31st, 2010 by Admin

Today I pushed the initial step for cpp-netlib to move away from having a header-only design. Yes, the project has come to a point where a decision had to be made: lower compile-time requirements and wider acceptance, or high compile-time requirements and limited acceptance. Until earlier today, builds of the cpp-netlib test suite had already been taking orders of minutes to build all the tests. I’m not talking about two minutes, I’m talking about multiples of 10 minutes on a reasonably powered machine. The whole test suite is an exhaustive suite of tests meant to make sure that the implementation is doing what it’s supposed to do. This limited my personal productivity as a developer, and the productivity of the users of the library developing other things on top of cpp-netlib. Something had to give and today I made the necessary changes to make that happen in 0.9.

Earlier on in the project, I really stuck to the “header-only” nature of the library. This was because I was convinced that the gains were really worth the costs. This is still largely true but there are a few compromises that had to be made. In this case the sacrifice was the added step of linking in an external static library for anything that is using cpp-netlib in their project.

The Change

First things first, not all the parts that I want to move out to static libraries have been moved out yet. The thing that requires the most compile time were the parsers — specifically the URI parser. I made very little changes to make the transition of the parser from a header-only parser implementation into an external lib implementation. You can find the relevant change set and the commit message through this link.

Just doing this has cut down the build time of the whole test suite by 60%. It used to take 10 minutes, and now the whole test suite just builds in around 4 minutes. I’ll publish exact numbers at a later time but generally this improvement in compile time would be welcomed by those using the HTTP clients. Because the URI parsing is a really important part of the library and because that in itself makes cpp-netlib unique, savings on the compile-times can really mean big gains for users of the library all-around. This addresses most of the concerns that users (both current and future) have of the library.

Balance

The library will at some point keep most of the implementation header-only while the heavier parts that take a lot of compile time would generally be moved out to externally built libraries. This means, almost all of the parts of the library that use Boost.Spirit will be moved out to external libraries because these are the parts that cost the most compile time (so far, that I’ve identified). This allows developers working on the library (there are a handful of us doing this) can keep some of the implementations header-only — when the costs become unbearably high on the compilation side, moving them to an externally linked library is always an option.

I personally think this is a good direction to go and I’m thankful to those who have advised me to go this route. Some have been a little more vocal than others but generally I’ve listened and I think this really does improve the library’s usability.

Future Direction

There are still some parts of the implementation that do cost quite a bit of compile time — not all the Boost.Spirit based parsers have been moved out just yet, and the parsers that deal with HTTP headers may very well be a candidate for “externalizing” in the coming days. All the other goodies that come with library development — tracking down bugs, improving the build system, creating distribution packages for various platforms, and the good stuff — would require the help of more developers. The website needs some help too, and the team would really appreciate help in coming up with layouts, designs, and copy for the website.

Testers on various platforms and compilers would very much be welcome too, and I’m looking to start investing and setting up that company to ensure that cpp-netlib keeps getting developed as an open source project. That company will provide paid support licenses to those looking to get commercial-grade support for the library in their enterprise and or the applications they are building. I’m looking to set up a (paid) support forum for those wanting to get commercial-grade support for cpp-netlib — hopefully I can get that out of the way and set up soon, but in the meantime if you’re looking to get support, you can get in touch with me through this form. ;)

As for content of the blog, don’t worry — the cpp-netlib updates will pretty much stop. I’ll be getting back to writing about generic programming in the coming week. I’ll just be taking a break this weekend and I’ll probably be writing a couple of lighter articles for light weekend reading. Look out for the weekly C++ roundup on Sunday (Philippine time).

Filed under: boost, cpp-netlib, project
C++ Soup!

Tags: , , , ,

iPad Sales Estimate Jumps 81%

Posted in IPhone App Programming on December 31st, 2010 by Admin

Apple will begin selling the iPad in 9 more countries on Friday. Austria, Belgium, Hong Kong, Ireland, Luxembourg, Mexico, Netherlands, New Zealand and Singapore will be added to the existing base, as Apple has been able to ramp its production to support new geographies.

However, “support” is somewhat relative as market researchers and analysts believe that Apple can still not meet actual demand and that iPad sales are limited by production capacity and not demand. iSuppli today raised its unit forecast by 81% to 12.9 million units for 2010. Next year, Apple may sell 36.5 million iPads and in 2012 50.6 million. If iSuppli is correct than Apple may sell 100 million iPads in less than three years, which makes it an interesting app platform, perhaps even more interesting than the iPhone for some.

“The iPad is shaping up to be the ‘Tickle Me Elmo’ of the 2010 holiday season, with product demand expected to vastly exceed available supply,” said Rhoda Alexander, director of monitor research for iSuppli.

For 2010, Apple is estimated to hold an 84% market share in tablet PCs and continue to dominate the segment at least until 2012. Competition may be insignificant until 2011 when other players, including HP, will have some products to show. iSuppli believes that Apple cannot sit back and just enjoy the success, but actually think about product improvements for next year. Likely additional changes will embrace an internal camera and expansion of the product line, potentially including additional screen sizes, the company said.

Apple rivals, on the other side, will have to focus less on the hardware but relate more to the suite of applications that can be paired with the hardware.

I may be speculating here, but I feel that this was not the last adjusted iPad forecast for the year.


iCodeBlog

Tags: , , ,

Making an Exception

Posted in C++ on December 30th, 2010 by Admin

An interesting debate about C++ exceptions took place a few weeks ago in the C++ MVPs discussion list. The trigger was something as innocent and specific as “ would you guys just throw std::runtime_exception with some error message string or you…(read more)
Visual C++ Team Blog

Tags: ,

Today iPhone is Best Consumer Technology.

Posted in IPhone App Programming on December 30th, 2010 by Admin

What do you think is the best consumer technology to emerge in the past decade?

Going through many blogs and doing grand research on mobile market. I found iphone a best from all the hand held devices due to its incredible iphone. There’s a lot to choose from, that’s for sure. LCD TVs, Wi-Fi, digital video cameras, social networking (Facebook, YouTube, etc.), e-book readers like the Kindle, sensor video gaming, 3-D for movies that really works – the lists goes on and on. But like David Einstein my vote also goes to the iPhone.

Like the Internet, the iPhone Programming changed everything. People had been talking about smart phones since the late 1990s, gushing over all the things you might be able to do with them. But it took Apple to come up with the device that made good on the promise. The iPhone set the bar for smart phones with its slim profile, big touch-screen and easy-to-use features.

Not only did the iPhone jump-start the market for smart phones – fundamentally changing the way people communicate – it created a market for small applications that run on smart phones. Today, there are about as many downloads of apps for the iPhone programming as there are people in the United States – more than 300 million. Finally, the iPhone set the stage for the iPad, another top breakthrough. I suspect that the personal computer of the future will be a hybrid of smart phones and iPad-like tablets. Of all the cool products Apple had introduced in its 30 years, the iPhone was the coolest, and people stood in line for hours to get their hands on one.

iPhone Software Programming, iPhone apps Development, iPhone application development, iPhone programming, iPhone features

Tags: , , , ,

Apply Security Constraints (Modification, Copying & Print) Over PDF

Posted in Visual Basic on December 29th, 2010 by Admin

Aspose.Pdf for Reporting Services 2.0.0 has been released. This new release includes a remarkable support for applying various security constraints over resultant PDF. An amazing feature of adding User Password, restricting the user from updating document contents as well as filling the form fields has been introduced. This new version is even more stable as compare to its predecessors and provides better support for processing complex reports. This release includes plenty of new and improved features as listed below.
Extreme VB and .Net

Tags: , , , , , ,

Broken Link Checker – All Free Again

Posted in Wordpress Plugin Programming on December 29th, 2010 by Admin

The “Pro” version of Broken Link Checker has been discontinued. All features that were previously paid-only have been merged into href="http://wordpress.org/extend/plugins/broken-link-checker/">the free version. This includes (among others):

  • Internationalized domain name support.
  • The ability to check embedded videos from popular video hosting sites (e.g. YouTube).
  • The ability to check links to popular file hosting sites (e.g. RapidShare).
  • Plaintext URL support.
  • Custom post type support.
  • Search & replace for bulk URL editing.

In addition, the plugin now includes a call for donations and a single ad.

What does this mean for you?

Free users

If you already have the free version installed, you should receive an update notification within a few hours. After installing the update, you can enable the newly available features in Settings -> Link Checker. Some features – e.g. IDN support – are on by default and don’t need to be enabled explicitly.

Pro users

If you own the Pro version of the plugin, I recommend moving to the free version. Just deactivate Broken Link Checker Pro and install href="http://wordpress.org/extend/plugins/broken-link-checker/">version 1.2.2 from WordPress.org. Your settings and data will be retained, and you will not lose any features.

Caution: Do not click the “Uninstall” link to remove the Pro version unless you want to erase your current settings. Instead, delete the /wp-content/plugins/broken-link-checker-pro/ directory via FTP.

Also, check the status of your update subscription (if you have one). It should be cancelled automatically, but it doesn’t hurt to make sure. Just in case, href="http://daveosborne.com/safe/cancelPayPal.php">here’s how you can cancel a PayPal subscription manually.

Analysis

Ultimately, the reason why I decided to drop the Pro version was very simple: “If what you’re doing isn’t working, try something else.” The purpose of every commercial plugin is to make money for its developers. The way I tried to achieve this with Broken Link Checker Pro was to offer a bunch of extra features and priority support for those willing to pay a small fee. However, after tracking sales stats for a several months and reviewing the results of a recent user survey, it became eminently clear that this approach wasn’t working.

Full disclosure: just before the Pro version was discontinued, Broken Link Checker had

  • 60 000 free users (estimated).
  • 70 paid users.
  • 39 active subscriptions.

That’s a free-to-paid conversion rate of around 0.11%, which is downright horrible even for a freemium product.

There are many things that can kill your conversion rate, but I think in this particular case the cause was straightforward: nobody cared about the Pro features. For 99% of users, the free version would be perfect – or at least good enough. A user survey confirmed this suspicion. The same survey also revealed that there was no must-have feature that I could implement to dramatically increase the attractiveness of the Pro version.

I could’ve tried removing features from the free version, but that’s 1) nearly impossible for an open-source application and 2) Evil™.

After much thought, I decided to drop the Pro version entirely and try something completely different* – all features for free, a prominent call for donations, and an ad on the settings page. I don’t know what the results will be, but I’m sure they’ll be interesting.

*In case you’re wondering, this model was inspired by href="http://yoast.com/wordpress/google-analytics/">Google Analytics and href="http://semperfiwebdesign.com/portfolio/wordpress/wordpress-plugins/all-in-one-seo-pack/">All In One SEO Pack.


Copyright © 2010 href="http://w-shadow.com">W-Shadow.com. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement.


W-Shadow.com » Blog

Tags: , , , ,

iPad: Ground Zero For Enhanced EBooks?

Posted in IPhone App Programming on December 28th, 2010 by Admin

So we know that the iPad is often criticized as a device that tries to be everything to everyone, but does not excel at any particular discipline. Amazon’s Kindle comes up as an example very often, in which the Kindle is described as the better specialized ebook reader as it has the better screen for reading and better battery life. However, we are also seeing first signs of a new development in ebooks where ebooks turn into multimedia apps that simply can’t run on a Kindle.

Michael Wolf has recently written a great article on this topic for GigaOm Pro (subscription required), and sheds light on what he calls enhanced ebooks. Wolf believes that enhanced ebooks are just developing with all the disadvantages that come along with such a trend – such as inconsistent apps for different platforms, but it is easy to see that, if he is right, that the iPad may be much better positioned for media-rich ebooks than the Amazon Kindle.

That trend has lots of implications for developers, which may suddenly be able to go into a business that was previously reserved for printing services, but offer new types of applications that, for example, create ebook platforms and allow content creators to easily publish media rich magazines, newsletters or ebooks. The market opportunity is substantial, as Amazon announced this week that it is now selling more ebooks than hardcover versions.

Wolf believes that enhanced ebooks may result “in a whole new digital book industry, much like has been seen in the digital video and music industries.” He sees the iPad as a key platform as this trend and consumer perception will evolve. “The media-consumption friendliness of the iPad is a natural choice for authors looking to create a multimedia-laden e-book,” he wrote.


iCodeBlog

Tags: , , , ,

Extending the iPhone’s SDK’s UIColor class

Posted in IPhone App Programming on December 28th, 2010 by Admin

A very detailed article along with code samples for extending iPhone SDK UIColor class and make it more useful by Ars Technica.

iPhoneDevelopmentBits

Tags: , , , ,

PHP and MySQL vs PHP and MariaDB

Posted in Programming Tips on December 27th, 2010 by Admin

Mariadb seal shaded browntext alt 150x150 PHP and MySQL vs PHP and MariaDB( This is a guest post by Gwen Davis. Thank you ! )

What is MariaDB?

With a General Public License, MariaDB is the community-developed replacement for the MySQL database management system due to Oracle’s ownership of MySQL. Under Oracle, MySQL will be free for use by software developers indefinitely, since it is unclear whether its license status will completely change in the future.

MariaDB is based upon the principals of the MySQL Database Server. For all intensive purposes, MariaDB works the same as MySQL. The commands, libraries, interfaces and APIs are essentially the same. It also contains all of the open source storage engines of MySQL database and some more as listed below:

* Aria

* Falcon

* XtraDB (drop-in replacement for InnoDB)

* PBXT

* FederatedX (drop-in replacement for Federated)

* OQGRAPH — new in 5.2

* SphinxSE — new in 5.2

There are some new features such as a new storage functionality called “Got Married” and a coding interface that goes beyond the simple command line structure of MySQL but overall, the interface is just faster and more reliable.

MariaDB has all the same functionality as MySQL, and is completely backwards compatible. This is because Michael “Monty” Widenius, the founder of MySQL, is the lead developer in the MariaDB project, and he is determined to keep the free database management system up to date with any new issues of MySQL released by Oracle in his absence. A fun fact to note would be that the MariaDB project was named after his youngest daughter.

Efficiency and Performance of MySQL vs MariaDB PHP Pairings

Both MySQL and MariaDB use PHP to structure their databases. PHP is free to use for anyone. Therefore, its combination with MySQL or with MariaDB will incur no initial investment or operational costs. Since PHP is primarily a scripting language used for a hosting server, the language is commonly used to create dynamic web pages. Developers use the language to create interactive web applications and web sites as PHP is user friendly and easy to learn, no programming languages are required to code. The syntax is simple, and the language is stable. Most developers simply embed HTML directly into the webpage without additional coding. The language and interface possesses a problem solving capability that assists developers if there is an error.

Lately however, MySQL is often compared with MariaDB in PHP website development. Again, MariaDB has the same functionality as MySQL, except MariaDB is a little bit faster and more robust than its predecessor. With the introduction of MariaDB and OPA of Oracle’s Sun system, MySQL will become less popular. The new MariaDB includes a new storage functionality called, “Got Married.” This new storage feature is purported better than, “MyISAM.” Furthermore, checksum proves to give a more accurate speedy result as MariaDB doesn’t ignore NULL’s unless it’s set to MySQL’s ‘old style’ checksum for backward compatibility.

Since MariaDB is truly a “drop and play” application, developers will have no problems with compatibility. Users may simply uproot MySQL and replace it with MariaDB. After doing so, developers will just notice the application is faster than their previous version. Developers using MariaDB in conjunction with PHP will enjoy more flexibility and ease of use than with MySQL.

Hence it’s no surprise that most analysts believe that it’ll only be a matter of time before developers switch from using MySQL to using MariaDB, so until then, MariaDB coding will be completely compatible with MySQL applications, and vice versa. Many robust applications use MySQL. Users that develop websites with MySQL do not necessarily need to transfer to MariaDB. However, most developers will not complain about functionality improvements.

MariaDB in the LAMP Stack

LAMP is an acronym for the best website host configuration which represents Linux, Apache, MySQL and PHP. Tech analysts believe that the M will soon be replaced by MariaDB as developers see how easy the new database management system is to port and use. Any software that uses the MySQL system can simply switch over to MariaDB and with little to no changes in coding and structure, enjoy faster speeds and improved functionality.

MySQL is a standard component of the LAMP web application software stack. The traditional LAMP structure in order to optimize MySQL employed the use of Memcache for speed as an option. As developers advance the offerings of MariaDB, users may expect that MariaDB will become the option of the traditional LAMP structure. Because MySQL and MariaDB are backwards compatible, this transition will be accomplished more easily in the future. Developers will be able to substitute MariaDB in place of MySQL and have even more functionality. MariaDB has also gained similar stability and possesses a more user-friendly interface even by itself.

So for the scripting component of the LAMP stack, support by MariaDB as opposed to MySQL will allow the users of the web browser to execute more programs on the server. Content may be both dynamic as well as static content and instead of PHP, Perl or Python as often substituted for their ability to handle multiple text streams from multiple sources simultaneously can do so with ease.

Experts expect that developers that built applications such as WordPress, Drupaland, and phpBB based on the LAMP software stack will consider MariaDB for future applications. Perhaps in time, Google, Wikipedia and Facebook will also consider MariaDB as well.

 PHP and MySQL vs PHP and MariaDB
Programming Tips That Help You Become a Better Programmer

Tags: ,

Code for Sending email from your iPhone App

Posted in IPhone App Programming on December 27th, 2010 by Admin

A quick and short tutorial plus code for calling mail app in iphone from your application and automatically filling in the address, subject and content. Read it here.

[source iCodeBlog]

iPhoneDevelopmentBits

Tags: , , , ,