Quantcast
Channel: Kynosarges Weblog
Viewing all 253 articles
Browse latest View live

JavaFX on iOS & Android?

$
0
0

JavaFX does not currently support iOS or Android, but the possibility has been subject to much hopeful speculation. One recent example is Felix Bembrick’s manifesto Six Degrees of Separation. What strikes me as odd is that people still seem to expect Oracle to deliver such ports. True, there was an announcement regarding open-sourcing “JavaFX on iOS and Android” which generated much excitement, but Richard Bair had quickly clarified the actual situation even back in February:

A few years ago at JavaOne 2011 we showed a demo of JavaFX running on Android and iOS devices. This was a proof-of-concept which has two essential elements. The first is a port of the Windowing / Graphics layer of JavaFX (Glass & Prism) to use iOS & Android APIs. This is what we are open-sourcing, nothing more nor less. We are not providing a JVM for these platforms, nor am I aware of any such plan, so it’s not in any way a complete solution. Nor do we have a plan for releasing these ports in any release. We’re just opening up JavaFX code to the Java community for further experimentation.

This means Oracle won’t do anything about iOS or Android, except contribute a preliminary port of Glass & Prism. The OpenJDK community must provide the substantial missing pieces: support to run JavaFX in the first place, plus enhancing the desktop-oriented JavaFX library with device-specific functionality. Contributors are already hard at work, but so far nothing is ready for public consumption even by average developers, let alone end users.

The absence of iOS/Android news from the recent JavaOne 2013 conference appears to confirm that Oracle’s intentions are still unchanged. So why don’t they care about such ports? Most likely because there’s no commercial benefit. As Sebastian commented:

It is hard to do really well, and it may simply not be worth the effort. The company would have to dedicate a sizable team of developers, working closely with Apple and Google (not bloody likely), and the result would be a second-rate way to develop iOS and Android apps that would forever be playing catch-up with the fast-moving targets that these platforms are, instead of doing much GUI innovation itself. And it would hold no appeal at all for committed developers wanting to build top-notch mobile apps, because they would learn and use the native APIs, because that’s what you do.

So what’s JavaFX good for, as far as Oracle is concerned? The company maintains a showcase of real-world JavaFX use cases, including ferry management and even facial surgery planning. As far as I can tell, these are all enterprise solutions that target fixed PC installations rather than arbitrary consumer devices. (Certainly, you don’t need to worry about annoyances like faulty DPI scaling if you’re only dealing with fixed screen resolutions!) Developer tools are another area where JavaFX would benefit Oracle directly – but obviously that’s no motivation for app store support, either.

That doesn’t mean Oracle won’t care about JavaFX on mobile platforms at all, but those platforms would be Windows or Linux tablets, or else custom-built devices such as the DukePad demoed at JavaOne. The DukePad is powered by Raspberry Pi which is already supported in OpenJFX, the open-source project behind JavaFX. Nice perspectives for custom embedded development, and that’s clearly where Oracle’s interests lie – not in app store deployment to a zoo of consumer devices controlled by (rather hostile) third parties.

Oracle isn’t in the business of making stand-alone consumer applications, after all, and there’s no lack of choices for building mobile front-ends. Besides platform-native development and HTML/JavaScript, popular cross-platform frameworks include Unity (for games) and Xamarin (for everything else). Indeed, it’s not clear that any substantial number of iOS/Android developers would use JavaFX even if it were available. Oracle’s own ADF Mobile framework simply combines a Java back-end with an HTML front-end.

Will we ever see JavaFX for app store deployment on iOS and/or Android? The remarkable success of relatively small companies like Unity and Xamarin indicates that the difficulties are not insurmountable. The real question is now whether there’s enough interest in the OpenJFX community to complete the ports, ensure they work on all contemporary device variations and OS revisions, and keep them working in the future. Time will tell…

2013-10-22: Richard Bair has posted an extensive status update regarding JavaFX on iOS (he doesn’t mention Android as far as I can tell). No real surprises there, but a lot of details regarding the current prototype implementation and what remains to be done.

2013-11-18: Johan Vos has started a community project that shows how to build JavaFX applications on Android. It should serve as a shared platform for future community efforts. Here’s his announcement and rationale.


C 11 Standard now for $30, too

$
0
0

The ANSI Store finally offers the C 11 standard for a reasonable US $30, under document 9899-2012. As a reminder, the C++ 11 standard has been available for the same price since April 2012, as document 14882-2012.

Note that the actual standard ending “:2011” has been replaced with “-2012” in each case. If you have too much money you can get the same documents for $285 apiece, from the ANSI or ISO Store – just use the unchanged standard identifiers!

ECMA still offers its standards for free, and recently added Standard ECMA-404: The JSON Data Interchange Format. With all of 14 pages, nearly half of them empty, it’s the shortest language standard I’ve ever seen.

(Updated Developer Links accordingly.)

Luttwak’s Grand Strategy of Rome

$
0
0

Edward N. Luttwak’s The Grand Strategy of the Roman Empire (John Hopkins University Press 1976) is a compact (255 pages) and brilliant classic on military and diplomatic strategies from the principate to the tetrarchy. Recently Luttwak published his long-awaited companion piece, The Grand Strategy of the Byzantine Empire (Harvard University Press 2009), much delayed and much expanded (498 pages) due to the richness and obscurity of Byzantine sources, the most important of which he describes individually. Definitely get both books if you are at all interested in military strategy and/or Roman history – they are wonderfully written and convincingly argued. In the following I’ll highlight some points I found especially interesting. Note that my brief summaries are not necessarily precise.

The Original Empire

Late republic and early principate followed the same basic strategy to secure and expand their borders, one that was extremely economic in its use of military force. The imperial heartlands were surrounded by intimidated clients who dared not attack Rome but who suffered the brunt of outside attacks, at their own cost. They were intimidated because Rome kept a policy of eventually annexing its smaller neighbors, one after another. Obedience might postpone this fate or ease the transition, especially for a conveniently corrupt ruler.

This policy could be maintained with a small mobile core of legions. It gradually failed when Rome had expanded to the utmost of its abilities in the first century. Now it was mostly surrounded by deserts, oceans, Germans, and Parthians, all of which stubbornly resisted further expansion. Rome continued a policy of diplomatically influencing its direct neighbors, but without a credible threat the necessary bribes increased even as the reliability of these “allies” decreased. The capacity for annexation was visibly gone, and with it went the principal incentive to obedience on the part of client rulers.

Luttwak exemplifies his analysis with the province of Dacia, established by Trajan in 106. On a map, this strange bulbous extrusion from Rome’s Danube frontier into the barbarian north looks like an unsustainable vanity conquest. But in the light of Rome’s client strategy it was actually the opposite: the last successful reprisal of the old annexation policy against a disloyal client. While the empire remained strong and its enemies disunited, the new province could even threaten neighboring independent tribes.

But the barbarians kept pushing westward in growing numbers, and paradoxically became more unified thanks to their Romanized culture in the border regions. Within the empire Romanization was a force of assimilation that eliminated unrest, but outside it enabled alliances against Rome where previously there was no common ground. This culminated in the German kings who crowned themselves kings of Italy and eventually of the Roman Empire itself, seeing themselves as the true heirs to the realm.

The empire’s first reaction against growing border incursions was to establish a defense in depth while keeping the basic system of mobile legions. However, that could not work without a shield of (more or less) loyal clients that absorbed the initial attacks. Now these attacks devastated vast tracts of imperial lands, and eventually threatened Rome itself. Diocletian finally instituted an extensive ring of hard point defenses on the frontier, essentially a wide strip of fortresses prefiguring medieval castles that could contain most incursions on the spot and otherwise hold out until help arrived. Interestingly, Constantine returned to a heavier emphasis on mobile field forces with fewer troops on the frontiers. The reasons are unclear but one may safely assume that insuring his rule against the next usurper played a prominent role – Constantine had been one himself, after all.

The Byzantine Empire

Byzantium never knew the kind of security and supreme power that old Rome had possessed for centuries. Peace was a temporary interruption of war, and that meant Byzantium could not afford Rome’s traditional attrition warfare whose goal was the total destruction of an enemy. On the contrary, the abundance of potential enemies made it essential that some of them should be won over by diplomacy, so as to help fight against the rest. The new strategic goal was to remove the current threat with as few losses as possible, to both Byzantium and today’s enemies who might be tomorrow’s allies. Byzantine diplomacy was routinely successful in converting the very multiplicity of potential enemies into its own remedy.

Byzantium essentially followed a more dynamic version of the old Roman client system, although from a weaker position where bribes often replaced threats. Thanks to the empire’s unique position as a pinnacle of luxury and sophistication compared to most of its enemies, such bribes and tributes were actually economic subsidies rather than net losses:

The Huns and all their successors inevitably used their tribute gold to buy necessities and baubles from the empire – special arrangements were negotiated for border markets – hence the gold exported to the Huns returned to circulate within the empire rather quickly, except for the minute fraction retained for jewelry. [p. 55]

The empire could not dream of protecting its entire territory by strong fixed defenses in the style of Diocletian. Aside from the region around the capital, Byzantium relied on an elastic defense that caught raiders on their return while the populace was sheltering in fortified frontier villages. Such border warfare required great speed and precision, which in turn relied on excellent training and morale. This circle emerges as a constant theme in Byzantine warfare: being numerically inferior, the imperial army relied on stratagems which required excellent soldiers, which in turn increased the length and cost of training, reducing the number of available soldiers even further. Diplomacy and bribes helped to boost numbers with foreign allies, though.

Luttwak showcases this system’s most famous success in Herakleios’ victory against the combined forces of Persians (under Chosroes II) and Avars who had already conquered most of the empire and were besieging Constantinople itself. From 624 to 628, Herakleios left his beleaguered capital behind and circled around the Persians’ rear to strike deep into the Sassanid heartland, reaching Ctesiphon itself. The Persians failed to catch him due to the amazing speed of his excellent army, and they utterly failed to anticipate his ability to campaign during winter. That last was possible thanks to hardy ponies supplied by the western Turkic qaganate – enemies of the Avars and Persians, won over by the far-ranging Byzantine diplomats. Meanwhile, the peerless Byzantine navy so completely repulsed the Avar attempt to storm the city from the sea that the Slavs who had supplied most of the Avars’ manpower left in dismay. The siege collapsed, and Byzantium regained almost all its lost territories in the ensuing peace negotiations.

The empire suffered large territorial losses from the Muslim jihad, but that was more due to popular dissatisfaction than any military failure. Early Islam’s discriminatory dhimmi taxes were “blessedly lower” than the regular taxes Byzantium and Persia had levied for their endless ruinous wars, and the dhimmi status itself was preferable to the Byzantine treatment of the remaining Jews and the Monophysite majority in the south. Christians and Jews in Zoroastrian Persia probably felt little different. Indeed, Luttwak judges the loss of Syria and Egypt to Islam “a mixed curse” for Byzantium, as it removed a major source of religious dissent: it brought the blessing of religious harmony, and increased cultural unity.

True Facts about the Cataphract

The famous Byzantine cataphract (i.e. “covered up”) has a rather complex history. The term was originally applied to the armored shock cavalry of the Parthians who defeated Crassus in 53 BC, in conjunction with a greater number of horse archers. Since then Rome had gradually adopted heavy cavalry covered in chain or scale armor whose riders used lances and swords or maces. Byzantium also relied on such cavalry throughout its existence.

That much I knew, but Luttwak presents two facts that surprised me. First, a major variant of armored cavalry that more closely resembled medieval knights was introduced by Sassanid Persia. These clibanarii were shock cavalry wearing full-body plate armor. The Latin name (Byzantium spoke Greek but loved Latin military terms) means “bread oven bearers,” mocking the heat that such warriors had to endure in the Mesopotamian summer. The Byzantines adopted this style as well, and apparently maintained cavalry units outfitted in both cataphract and clibanarii fashion for several centuries.

The second surprise was a bigger one. During the height of Byzantine power, heavy cavalry units were routinely trained as horse archers in the Hunnic style! Seeing how easily Attila’s hordes overpowered the traditional Roman army, the new empire quickly copied the Hunnic style of horse archery with the powerful composite reflex bow, effective up to 150 meters and piercing armor up to 60 meters. But you’d still want heavy cavalry for charging, and why have two soldiers when one can do both jobs? So the Strategikon attributed to emperor Maurikios (ca. 582–602) describes a kind of super-soldier as the mainstay of the Byzantine army: armored with cataphract-style chain or scale mail, shooting the composite bow from horseback like a steppe nomad, but also fully capable of charging with the lance and sword-fighting at close quarters. Here’s a training routine from the Strategikon:

On horseback at a run he should fire one or two arrows rapidly and put the strung bow in its case, if it is wide enough, or in a half-case designed for the purpose, and then he should grab the lance which he has been carrying on his back. With the strung bow in its case, he should hold the lance in his hand, then quickly replace it on his back, and grab the bow. It is a good idea for the soldiers to practice all this while mounted. [p. 271]

Strategikon

Original Strategikon chapter. Click for details and full-size version.

Horse archery also adds a twist to the history of the stirrup, presumably introduced by the Avars and adopted by the Byzantines. Contrary to popular assumption, stirrups are by no means necessary for lance charges. They would add little extra stability over tightly gripped thighs and a high-backed wooden saddle. Aside from easier mounting, their most important military use would indeed have been for standing up while aiming the bow.

If Byzantium’s extensive use of archery is little known today, some of the fault may lie with the Byzantines themselves who couldn’t quite get over the Homeric (and Roman) prejudice that bows are for wimps. Writing in the 550s, Procopius still feels the need to apologize for the empire’s archer-soldiers:

Homeric bowmen… were neither carried by horse nor protected by spear and shield… Least of all they could participate in a decisive struggle in the open… But the bowmen of the present time go into battle wearing corselets and fitted out with greaves which extend up to the knee. From the right side hang their arrows, from the other the sword. And there are some who have a lance also. [p. 57]

Fall Patch for Civ5 Brave New World

$
0
0

Firaxis has just released patch version 1.0.3.142 for Sid Meier’s Civilization V, or rather for Brave New World since most changes are specific to that expansion. I’ve updated my own Civ5 Patch Notes accordingly, this time with extensive reordering and reformatting since the official post was somewhat disorganized. Firaxis also published the Scrambled Continents Map Pack as a separate purchase, for continents with known outlines but randomized interiors.

The 39.6 MB patch contains nearly 200 listed changes, mostly balance & bug fixes for Brave New World. Disappointingly, this still doesn’t fix all issues – in my first test game, I saw that archeologic dig sites were still announced with two icons per site, and the Hermitage theming bonus seems newly broken. Most of my annoyances with the original BNW release are still intact, too: there’s just a pamphlet instead of a real manual, the new culture and trade route systems are hampered by laborious UI, and the computer players are less challenging on King than on Gods & Kings’ Prince level, despite enhanced cheating. Still, the patch does improve many things, including the following:

Added Bonuses

  • Tourism was made useful outside of culture victories. Starting with “Familiar,” growing tourism influence now grants a variety of increasing bonuses: extra science from trade routes, stronger spies, and lower unrest and population loss in conquered cities.
  • Archeology is also somewhat more useful, with the possibility to unearth Great Works of Writing, and a diplomatic bonus for creating landmarks within the territory of another empire or city-state.
  • Germany and Japan received badly needed boosts. Germany gets the Hanse building, providing a 5% production boost across the empire per city-state trade route. Japan gets multiple bonuses: extra culture from fishing and atolls, Zero fighters without oil, and samurai that upgrade to riflemen and build fishing boats (!?).

Diplomacy Changes

  • The AI’s diplomatic penalties for the human player’s “warmongering” are now divided into four levels, build up more slowly, and are halved when fighting a common enemy.
  • Diplomatic victories now require 2–9 more votes, depending on the map size. This makes it slightly harder to coast to an automatic victory by being peaceful and nice to city-states, but in practice it’s easily offset, e.g. by researching Globalization. You still don’t need to convince other leaders to actually vote for you.
  • Influence on liberated city-states was finally fixed. You used to get a mere 60 points, meaning they’d immediately drop out of ally status unless you had been previously friendly or you bribed them. Now the liberator gets 150 points, and previous influence by all other empires is drastically reduced.

Better AI Behavior

  • The AI should now accept fair deals and suggest complex offers to human players – I got lots of luxury offers for gold and strategic resources, for example.
  • The AI should amass only half as many military units before finally daring to attack. Units should no longer wander away from their formation, but may embark to bypass congested land passages.
  • The AI should be more reluctant to settle worthless spots, and take more care to eradicate nearby barbarian camps. Moreover, a bug was fixed in the routine used to retreat AI units to safety, so hopefully there will be fewer AI civilians lost to barbarians.

Some badly needed bug fixes include free buildings provided by social policies, which now remain operational if they had already been constructed. Losing the aqueduct bonus was a real nuisance. In the “more stuff” category, we have three new pantheons, three new city-states, and 19 new Great Works of Art. Multiplayer also received numerous fixes but Pitboss still requires a dedicated server, meaning you can’t host a Civ5 multiplayer game on the same machine you’re playing on. It’s not clear if that will ever change.

There were two remarkable changes regarding science victories. I’ll quote the AI fix in full: Don’t consider capitals to be “medium cities”. This change allows AI to start Apollo Program far earlier in Information Age starts where few cities are “Large” until 30+ turns in. In other words, the AI was so remarkably bad at science victories because it was delayed by a heuristic restriction… Bizarrely, the patch offsets this fix by doubling the costs of all spaceships parts – to increase the value of the Space Victory tenets. I would have preferred to cut down on the overabundance of ideology tenets, instead of changing another part of the game that worked quite well, and making it even harder for the AI to win.

All told I’m still not really happy with this expansion but since everyone else seems to love it I don’t expect we’ll see any significant further changes.

2013-11-19: Update 1.0.3.144 was quietly pushed out on 30 October, and fixes a few things not mentioned in its very brief change list. Dig site notifications are sometimes correct now, and the AI seems a bit more active in attacking the player. It still cannot handle the peaceful victory conditions, though, and falls short of its overall strength in Gods & Kings.

Windows 8.1: Much Ado About Nothing

$
0
0

Yesterday Microsoft released Windows 8.1 as a free update for Windows 8. I dutifully updated but found it barely worth the effort. Endlessly hyped as the fixed version of Windows 8, the one that would finally realize the original vision and convince desktop users of its brilliance, Windows 8.1 is in fact nothing of the kind. Microsoft still tries to fight its declining consumer market share on the back of its loyal customers, with a total disregard for their actual needs and expectations. Windows 8.1 hasn’t changed this, it just tries to cover it up a little. The new version mostly focuses on bringing Metro features out of their miserable alpha state, so the only people who are going to be fully satisfied are those who actually used Windows 8 on a touch screen. For everyone else there’s very little improvement indeed.

Installation

The installation went very smoothly. My applications and settings made the transition with no problems. I had forgotten to update my beloved Classic Shell before starting the installation, but Windows 8.1 correctly recognized the old version as incompatible and did not start it. I then upgraded to the latest version, Classic Shell 4, which supports Windows 8.1 perfectly.

There’s one massive annoyance during installation: Windows 8.1 pretends to require a Microsoft account for login. In fact you can still use a local account, but at least when updating from Windows 8 there’s no obvious option for this. You must first select “Create a new account,” then “Continue with existing account” – and that’s your Windows 8 offline account, assuming you had been using one.

Trivial but also annoying: The new default desktop background and all optional backgrounds are positively blinding. Their garish colors and stark contrasts seem intended for tiny phone screens, much like the whole Metro experience. I had to revert to a solid blue background just so I could work without constant irritation. Where are the beautiful soothing images from previous Windows versions – the ones that made sense for a background?

Start Screen

Metro on the desktop is still a terrible experience. Non-touch navigation requires hidden mouse gestures or keyboard shortcuts. They are documented by new help screens and animations, but why are essential functions hidden in the first place on my huge 27″ screen? There’s now a proper Start button on the desktop, but it just calls up the Start Screen. At least you can right-click for more options, although this is once again not obvious.

New “Taskbar & Navigation” settings allow booting straight to the desktop and disabling “hot corners” for unwanted Metro functionality, but Classic Shell already did that. The Start Screen itself might be slightly improved, but you still can’t have a dense text list and any nested Start Menu folders are still flattened out. In other words, Classic Shell is still mandatory. Given the hype surrounding these minor UI tweaks prior to release, they are massively underwhelming. If you’re happy with Windows 7 you should stay there, and possibly evaluate Mac OS-X or Linux alternatives.

Changed DPI Scaling

As mentioned previously, Windows 8.1 supports per-monitor DPI scaling. Since I’m using a single monitor I didn’t see any effects from toggling this option. If you do have multiple monitors, note that Windows 8.1 forces blurry DPI virtualization (= bitmap scaling) on all legacy applications that are dragged between monitors with different DPI settings. To avoid this you can disable per-monitor DPI scaling globally, using the new option “Let me choose one scaling level for all my displays.”

There’s also the expected new radio button for the old 200% setting. Otherwise DPI scaling for existing programs appears unchanged, with one very significant exception: Windows 8.1 removes the option to force XP style scaling. The old default – XP style scaling forced only at 125% – is now permanent and mandatory. Every application that doesn’t declare itself DPI-aware will use blurry DPI virtualization at 150% and higher, unless you opt it out explicitly. Here are some examples of affected programs:

  • Apple iTunes, champion record holder of broken Windows UIs. Ugly but necessary.
  • Steam and the Asus Xonar DGX control panel. These custom-drawn windows aren’t technically broken but don’t bother scaling at all, so this too was necessary.
  • Surprise entries: Adobe Acrobat X and Google Chrome both run fine at high DPI but neglect to identify themselves as such. Until they are patched you’ll need to configure them manually, as described below.
  • Embarrassing: even some Windows utilities lack the DPI-aware flag, e.g. Device Manager and Resource Monitor.

To opt applications such as Google Chrome out of DPI virtualization, right-click on the executable in Windows Explorer, select the “Properties” dialog, switch to the “Compatibility” tab, and check the option “Disable display scaling on high DPI settings.” Windows 8.1 finally provides this option for both 64-bit and 32-bit applications, so at least you no longer need a registry hack. See High DPI Settings in Windows for more details on these issues.

As expected, Windows 8.1 does respect the DPI-aware flags set by Java Swing and JavaFX applications. This means that they are unaffected by forced DPI virtualization, but also that the known problems with JavaFX DPI scaling remain unsolved.

All told, the surprising and disruptive way this change was implemented is symptomatic for Microsoft’s recent attitude. If the established DPI scaling behavior was going to change, the proper solution would have been to make DPI virtualization opt-in (for the user) rather than opt-out, as it should have been from the start. Instead, Microsoft once again took the route of least effort, punishing its customers for the neglect of third-party developers.

Internet Explorer 11

Internet Explorer 11 seems to have changed its font rendering. Some fonts remain strangely blurry, even after tinkering with the Control Panel’s ClearType tuner. Bizarrely given the new emphasis on DPI scaling, IE11 also no longer defaults its zoom level to the Windows DPI scale. I had to select 150% manually and uncheck the advanced option “Reset zoom level for new windows & tabs” to keep it. IE11 also defaults to enabling “Enhanced Protected Mode” which has the effect of disabling various incompatible add-ins, hilariously including Microsoft’s own Silverlight as required by some current Microsoft web pages. Good job there, guys.

Removing Metro Apps

Windows 8.1 gives you the option to quickly uninstall most default Metro apps. On the Start Screen, simply right-click on any unwanted apps, then select Uninstall in the bottom panel. To see how much space will be freed, start the “immersive” control panel (“PC settings”), select “Search and apps” and then “App sizes.” To reinstall any of these apps, start the Store, right-click at the top of the screen (!), and select “Your apps.” Here you can see all default apps, including those not currently installed.

Emboldened by this success, Classic Shell users might try to delete the Start Menu links to the remaining Metro apps, such as Store and PC Settings itself. Do not do this! Those Start Menu links aren’t duplicates from the Start Screen – they are the only shortcuts to the respective apps in the entire system! Once you delete these shortcuts you won’t see any reference to their apps anywhere – not on the Start Screen, not even using the Search charm.

If you did delete these shortcuts, how can you get your apps back? Simply running the executables, e.g. Store in %windir%\WinStore\WinStore.htm, or creating new shortcuts will not work. Metro app links evidently store a great deal of special metadata that’s required for successful execution. Fortunately, the original shortcuts are kept in the global Windows system file cache, C:\Windows\WinSXS, so you can easily get them back with the Windows Resource Checker (née System File Checker). Run sfc /scannow from an administrator command prompt, and the original app links should be restored to their proper places.

2013-11-05: Classic Shell has now added the option “Hide App Shortcuts” to its “Main Menu” settings page. This very useful option hides Metro app links from the regular “Programs” folder in the Start menu, so they only show up in their dedicated “Apps” folder. You’ll no longer feel tempted to delete those links!

Further Reading

David Pogue’s Reconciling 2 Worlds With Windows 8.1 is a fine review of the new version and why it still doesn’t work. For those who want to (or must) use it anyway, Ed Bott’s free e-book Introducing Windows 8.1 for IT Professionals is a good in-depth discussion of Windows 8 and 8.1, even for regular users. He also provided a quick feature overview and a guide to avoid Metro features for Windows 8.1 specifically. And Microsoft’s Joao Botto has compiled tips for the new Start Screen and Start Button.

Some notable missing pieces compared to Windows 8 include the Windows Experience Index (good riddance), the Messaging app (replaced by Skype), and notably Windows Backup. Ed Andersen claims that Windows 7 file recovery was removed as well. Apparently Microsoft really wants everyone to sync with SkyDrive so that the NSA finally gets to see all your data – and you get to see brilliant new error messages. Finally, Microsoft has compiled lists of new features, from the perspective of both users and developers.

Marumi Macro October

$
0
0

Autumn was unusually warm and sunny, so I managed to shoot another batch of arthropods. Once again, the equipment was a Sony NEX-7 with the SEL-18200 zoom lens and a Marumi DHG Achromat +3 macro filter. Most of the pictures are new, but you might have seen a few in Google+ posts from August or September.

You can find the new collection of 13 pictures in Macro October, including 12 macro shots and one cute squirrel posing as guest star. Click on each thumbnail for more information, including my description and partial EXIF data, and to zoom into the full 6000×4000 picture. Below is a low-resolution sample of a giant cricket of unknown species, sunning on a wall.

Cricket

yWorks yEd & UML Doclet

$
0
0

The core products of yWorks are the yFiles libraries for Java, .NET, and JavaScript which handle graph analysis, layout, and visualization. The libraries are enterprise-priced (thousands of dollars) but yWorks also offers some very interesting free tools. Aside from the yGuard bytecode obfuscator, these are all diagramming applications based on yFiles.

yEd Graph Editor

The yEd Graph Editor (written in Java) is a straightforward editor for technical diagrams, with special support for connected graphs. The shape palettes aren’t as complete or pretty as in big commercial products, but the user interface is pleasantly intuitive. Horizontal and vertical alignments are conveniently highlighted while dragging around objects and connections. A broad variety of layout algorithms can rearrange entire collections of nodes, rerouting their connections as desired.

Moreover, the range of supported file formats is remarkable. yEd natively saves to GraphML, allowing easy interaction with other tools. Supported export formats include not only the usual image formats but also SVG, Adobe Flash, PostScript, and PDF. The latter is especially nice for print-quality documents where images usually look like a blurry mess. yEd can import data from Microsoft Excel and even genealogy databases, although I haven’t tried that.

yWorks UML Doclet

The yWorks UML Doclet is a nifty Javadoc extension based on yFiles that creates UML diagrams from your project’s classes and inserts them directly into the corresponding Javadoc pages. The process is configurable and completely automated. The free version used to be a limited demo but is now fully functional, requiring only that a yWorks link at the bottom of each diagram is left intact.

Below is a sample diagram produced by the yWorks UML Doclet 3.0_02 for the upcoming Java version of Star Chess. I shortened the HTML a bit compared to the original version which references the Adobe SVG Viewer plugin for compatibility with older browsers. The Javadoc page also allows clicking on all identifiers to reach their corresponding pages. As you can see, the mandatory yWorks link is really quite unobtrusive.

Your browser does not support SVG content.

(Note: You might not see the diagram above if you’re using an RSS reader or an outdated web browser. Try showing the post in a new window of a current browser.)

The doclet comes with fairly comprehensive documentation but some important things are easy to miss and stumped me for a while. First, generating the diagram as shown required the following changes to the configuration file, resources/ydoc.cfg:

  • Change the values of all style properties from original-style.xml to the prettier yFiles-style.xml. Note that you must do this four times, as the style is specified independently for each configured diagram type!

  • Uncomment the sample exclude group and changed all four nested property values to java.*,javax.*. This excludes all standard library types from diagrams. You might also wish to add javafx.* and so on.

  • Change the value of the fileformat property from PNG to SVG, the associated scaling property from SHRINK_TO_SIZE to ACTUAL_SIZE, and reserveMinimum to false. This shows all diagrams at 100% scale without extra borders.

Some Javadoc flags are also needed to automatically generate diagrams along with the usual documentation. In NetBeans, those are specified under “Build: Documenting” in the “Project Properties” dialog. The complete text I entered there looks like this:

-docletpath "/Binaries/uml-doclet/lib/ydoc.jar;/Source/StarChess/dist/StarChess.jar" -doclet ydoc.doclets.YStandard -resourcepath "/Binaries/uml-doclet/resources" -umlautogen
  • The complete doclet path must be specified twice, followed by its JAR location in -docletpath and by its resources folder in -resourcepath.

  • You must also specify the complete path to your project JAR in -docletpath. If there’s some way to enter a project-relative path I couldn’t find it.

  • Don’t forget -umlautogen or a similar flag! Otherwise, the doclet will run fine but won’t generate any diagrams.

Old Floats & New Fonts

$
0
0

From the history of computing to tips for indie developers and icon fonts, here are the latest additions to my website archives over the last month.

Developer Links: Charles Severance’s 1998 Interview with the Old Man of Floating-Point – that is, William Kahan – describes the terrible mess in the bad old days before IEEE 754 standardized the behavior of floating-point arithmetic.

Making Games: Jon Shafer strikes again, this time on Pocket Tactics. The Future of User Experience in Mobile Gaming discusses user interfaces on handheld devices with touch input. And Roger Paffrath has compiled an extensive list of What NOT to do when starting as an indie game developer, with numerous links to related articles.

Typography Links: The Adobe Typography Primer (PDF) concisely explains the most important typographic terms and techniques. Note that the brochure was published in 2000, so some details on software are dated, but the principles remain valid. See the Typblography announcement for more information.

Moreover, Ionicons joins Font Awesome as another freely redistributable font containing hundreds of high-quality application icons. Ionicons also comes in various formats, including TTF and SVG, and with CSS declarations for web use.


JavaFX ListView Sizing

$
0
0

JavaFX supports automatic self-adjusting layout that resizes controls along with the containing window, but this may require some non-obvious changes to the controls’ default properties. The problem I recently ran into was automatically resizing a ListView within a VBox. This article describes the undesirable default behavior and its correction, based on JavaFX 2.2 in JDK 7. It might also prove useful for similar issues involving other containers.

Demonstration

I wrote a tiny JavaFX program, ListViewSizing.java, to demonstrate the problem and the various stages of its solution. The following screenshots were taken on Windows 8.1 at 120 DPI (125%). The layout issues exist independently of DPI settings, but I found they appear most obviously and conveniently at 120 DPI. Since we’re interested in window resizing, I took two screenshots of the same eight window (Stage) configurations, with all windows in the second screenshot twice the height of those in the first.

Short WindowsTall Windows

Click on each image to show a full-size version in a new window

What are we looking at? From left to right, we start with the unsatisfactory default property values (A1/B1), then change two different properties (A2-3/B2-3), until we achieve our desired layout behavior (A4/B4). Here’s the structure of each window:

  • The (invisible) root node is a VBox with two children.
  • The top child is a simple Text in A1-4, and the same Text wrapped in a TabPane in B1-4.
  • The bottom child is a ListView which should fill the entire rest of the window.
  • The “Height” shown at the top is the actual height of the ListView, i.e. getHeight.
  • The “prefHeight” is its preferred height used in layout calculations, i.e. getPrefHeight.
  • And “Vgrow” is the grow priority of the ListView within the VBox, i.e. VBox.getVgrow.

In the following analysis, I’ll use “short” and “tall” to reference the windows as shown in the top and bottom screenshot, respectively, e.g. “A1 (short)” versus “A1 (tall)”.

Analysis

In the first column, only A1 (short) is correct. The default property values cause various layout failures in every other case.

  • A1 (tall) – the ListView stops growing at 400 pixels, leaving empty space.
  • B1 (short) – the ListView hides the TabPane entirely!
  • B1 (tall) – the ListView still partially overlaps the TabPane.

Obviously, the ListView’s default preferred height (USE_COMPUTED_SIZE) doesn’t work too well. But merely setting it to zero is no solution, either. As the second column shows, the ListView simply disappears in this case, with an actual height of two pixels.

In the third column, we leave the preferred height alone and instead set the VBox grow priority to ALWAYS. This fixes one case, namely A3 (tall) where the ListView now correctly stretches to the bottom of the window. The faulty B3 cases with the hidden or overlapped TabPane remain unchanged, though.

The fourth column combines a preferred height of zero with a grow priority of ALWAYS – and now everything works. The plain Text variant in A4 appears as before, but the TabPane in B4 is finally properly cleared at both window sizes. In the tall versions, the actual ListView height difference between B1/3 and B4 is small – 396 versus 392 pixels – but that was large enough to cause an ugly overlap.

Bonus Bug. You might try to encourage a ListView to occupy the maximum available size by setting its preferred size to Double.MAX_VALUE. Not only does this not work – it will lock up the application! JavaFX apparently actually tries to allocate a ListView of infinite height…

Causes

First, where does the maximum height of 400 pixels in A1 (tall) come from? Digging through the JDK library jfxrt.jar with Emmanuel Dupuy’s Java Decompiler, I found the method computePrefHeight in class com.sun.javafx.scene.control.skin.ListViewSkin which simply returns the constant value 400. The companion method computePrefWidth takes that method’s result and multiplies it with 0.618033987. These values are clearly arbitrary but I’m not sure how to improve on them, since a ListView by its very nature is not tied to some fixed or natural size. I think a ListView should never supply a default preferred size in the first place.

The ListView overlapping the TabPane in the B rows is a tougher question. In the short samples, why does a largely empty ListView completely hide a TabPane with fixed text content? That looks like an error in the JavaFX layout algorithm to me. In the tall samples, the mysterious height of 396 pixels is just halfway between the correct height of 392 pixels and the hard-coded preferred height of 400 pixels. Was the layout algorithm trying to find a compromise between correct and preferred size? At any rate, the TabPane evidently doesn’t push back hard enough in the internal layout calculations.

Summary

Whatever the causes, the lessons for ListView users are clear enough.

  1. The “computed” default value for the preferred size is useless. Either specify your own fixed size if you have one, or set the preferred size to zero. Otherwise it may cause undesirable interference with layout calculations.

  2. To correctly have a ListView grow with its container, look for the corresponding property on the container itself. If none exists you will have to directly bind the ListView’s size properties to the container size.

Once you know what to do it’s simple enough. I do wish we’d get the obviously desirable and sensible behavior by default: grow to all available space not otherwise occupied, but no further. It would be great if that could be fixed in a future JavaFX version.

Raw Conversion with Squirrels

$
0
0

So far I had let my Sony NEX-7 convert all pictures to JPEG format in-camera. However, professionals say the professional thing to do is to use a digital camera’s raw image format that precisely captures the original sensor data. There are two problems, though. First, raw images are several times as big as JPEGs, with a corresponding increase in transfer time and storage space. Second, you still have to convert them to JPEG for publication, which is universally supported and more compact for uploading.

The extra transfer time is annoying but even the JPEGs were big enough that you could make some tea while the USB 2.0 transfer was running, so it’s not that much worse. Conversion does require extra software but Sony provides its Image Data Converter as a free download. On the upside, the IDC knows all about Sony’s cameras and lenses, so it can e.g. correct the rather sizable distortion of the SEL-18200 zoom lens and generally exactly reproduce whatever the camera itself could do. On the downside, the application is rather sluggish, taking several seconds to process every single change to an image. It also fails to remember recent settings, and crashes regularly after editing a few images. That’s the 64-bit version on my Core i7 920 with 6 GB RAM and an AMD 6970 graphics card, for the record.

Nevertheless, I managed to convert a few practice shots from raw to JPEG. I probably could have done these simple adjustments in JPEG, so the pictures aren’t anything special. I decided to upload them anyway because one of our neighborhood squirrels happened to pose for me and everyone loves squirrels, right? Raw Squirrels is a set of seven pictures, all taken in raw format on an overcast November day and then adjusted to a color temperature of 5800 Kelvin to give the impression of sunshine. They are also cropped from 6000×4000 to 4000×3000 since I wasn’t close enough for a frame-filling squirrel, despite the 200 mm zoom lens. As usual the Google+ gallery provides all images at full (cropped) resolution, with optional zoom and EXIF data. Here’s a low-resolution sample of the first picture:

Squirrel!

Cubist Lords of Waterdeep

$
0
0

Playdek’s latest iOS board game adaptation is Lords of Waterdeep, a worker placement game set in the Dungeons & Dragons universe. The board game itself is quite recent, published in March 2012 – click “Product Details” to download the original PDF rules. There was some apprehension regarding the fairly simple design that shares very little with the famous role-playing system. Still, D&D and Playdek sounds like a match made in Mount Celestia, and Pocket Tactics’ Kelsey Rinella was properly enthusiastic about the result. After several hours I certainly agree with him. Lords of Waterdeep is a great light strategy game for D&D fans, even and especially if you don’t normally like worker placement games.

The typical Playdek polish is immediately evident. The city of Waterdeep is rendered in beautiful detail, with parallax scrolling and plenty of decorative animations. Ships sail, griffins circle, clouds drift, and there’s even a day-and-night cycle. The zoomed-in view gives the background art perhaps rather too much space, but you can zoom out for a simplified view that avoids scrolling. Quests and intrigues are represented by cards boasting the usual D&D ren-fair artwork in all its splendor – see the example below. Checking your own and your opponents’ cards does require slide-out panels, but there’s one well-hidden alternative view. Tap on your (or anyone’s) red victory point icon for an overview screen that shows all players at once. Here you can also access a history of played cards, via the scroll icon.

There’s just one curious lapse in the gorgeous visuals. The board game represents adventurers as simple cubes, color-coded for basic D&D classes – cleric, fighter, rogue, wizard. Rather than using realistic figurines or at least recognizable symbols, Playdek faithfully renders all your adventurers as those same little colored cubes. Fulfill a quest, and a flock of cubes flies across the map. I can only imagine that Wizards of the Coast’s licensing prohibited a less ridiculous representation. After a few games you’ll get used to it, though.

Lords of Waterdeep

Three valiant cubes foil the Zhentarim

These cubic adventurers are not your “workers” but your resources, along with gold. You collect them by placing agents on various recruitment buildings, and expend them to fulfill quests. There are three special map locations: Cliffwatch Inn provides new quests; Builder’s Hall sells new buildings that provide exclusive owner benefits, in addition to resources for any visitor; and Waterdeep Harbor allows playing intrigue cards. These add a nice competitive twist to the worker placement formula. Intrigues are mostly sent to another player for a variety of amusing effects, from outright resource stealing to imposing a low-paying mandatory quest.

Each player is supposed to represent one Waterdeep faction and one of the titular lords whose identity is hidden until the final scoring. Sadly, factions are purely cosmetic and lords are distinguished only by small victory point bonuses for specific quest types. The game runs for eight rounds, then victory points are determined based on fulfilled quests, lord bonuses, and the number of unspent adventurers and gold pieces. Scoring is simple and straightforward, with the hidden lord bonus as the only factor of uncertainty. That’s worth pointing out because worker placement games tend to employ byzantine scoring mechanisms.

If Lords of Waterdeep doesn’t sound very deep that’s because it isn’t. You can easily finish a solo game against the remarkably competent AI players in 30 minutes. Asynchronous multiplayer tends to stretch out, but only because quite a few cards require input during opponents’ turns. There’s plenty of room for greater complexity, and indeed the first expansion (which I hope we’ll see on iOS at some point) introduces corruption as a new negative resource. Moreover, your enjoyment may depend on your affinity to the Dungeons & Dragons universe, and your willingness to read the plentiful flavor text. As for me, I found Lords of Waterdeep immensely entertaining as it stands, and especially recommend it to anyone who tried and failed to get into classic worker placement games.

Worker Placement Classics

There are quite a few of those on iOS, but until Lords of Waterdeep the only one I liked was the unusual Tikal. Sadly, Codito’s port is rather outdated by now. Playdek itself has created a gorgeous and well-received port of Uwe Rosenberg’s famous Agricola, generally considered the pinnacle of the genre. No boring cubes here – you pick up cartoon sheep that wriggle pathetically as you drop them onto your cooking hearth! The life of a 17th century farmer is convincingly animated, but much less convincingly simulated. The way resources become gradually available is both brutally restrictive and utterly non-intuitive. Final scoring adds another big dose of complexity, awarding a mess of varying bonuses for what you did – and penalties for what you didn’t. The result is what’s derisively called a spreadsheet game. You need to evaluate all the possible combinations and plan out your entire strategy right from the start, so as to maximize your net return of victory points per worker action.

Scoring is a notorious backdoor for arbitrary complexity in the worker placement genre. Another classic, Michael Tummelhofer’s Stone Age, got another high-quality iOS port by Campfire Creations and looks at first blush just as easy to play as Lords of Waterdeep. That impression lasts until the game ends and you discover that your score isn’t determined by your total construction efforts, but by the product of each kind of construction times the total number of icons depicted on each corresponding set of brown civilization cards, plus the square of the total number of green civilization cards! I found that scoring mechanism exactly as unfathomable as it sounds, and more than enough to offset the simplicity of the rest of the game. It doesn’t help that the game is thematically rather weak. All buildings you can buy act merely as equivalent VP tokens but cost wildly different sets of resources, evidently chosen only for the sake of mathematical optimization.

I spent less time with Caylus, William Attia’s castle building game that was ported by Big Daddy Creations. I refer the gentle reader to Bruce Geryk who lauds Caylus thusly:

When everything is out in the open, you can appreciate every skillful manipulation of the game, regardless of what it means in the game world. Watching some guy take penalty after penalty and still beat me was all the more amazing because I could see him doing it. He would even make comments, like “Oops, I guess I forgot to build a castle this time.” The first time I thought he was serious, until the fruit on his head became obvious. From then on, he won major style points for ostensibly “playing the game wrong” but still cleaning my clock. If someone were to try that against me now, I could probably stop him. But I would be focused on the mechanics, and not so much on the castle.

Indeed, this utter non-intuitiveness that requires a great deal of rules expertise describes the average worker placement game pretty well. This genre appeals to players who enjoy mastering complex rule systems, even against the apparent thematic situation. Lords of Waterdeep is the opposite: planning is generally short-term and based on the obvious board configuration, as in simpler traditional games. There is no need, or indeed possibility, to plan out long complex build chains. Fans of Agricola may find this disappointing, but I rather enjoy not having to set up a spreadsheet to know when I should buy my second pig…

The Amazing Clinometer

$
0
0

Peter Breitling’s Clinometer is a small but sophisticated and very useful application for iOS, Android & Windows Phone. Using the various motion sensors built into these devices, it turns them into multipurpose (in)clinometers that can measure any surface’s three-dimensional angle relative to the ground. The picture below shows the two main display modes: a simulated gas bubble as in a spirit level (Wasserwaage) when the device is held horizontally, and a compass-style display when held vertically.

Clinometer

There’s plenty of additional features: an optional voice readout of the current measurement so you don’t have to look at the screen; a lock of the current position for difference measurements; an automatic lock when the device is motionless for an adjustable time period; a see-through mode using the back camera; and many more as outlined on the Apple iTunes page.

Loyd Case, who recommended the app on Twitter, noted that the iPhone Compass app has a similar feature in iOS 7 but it’s “somewhat crude by comparison.” Peter Breitling offers several similar apps that turn an iOS device into an accelerometer, a geometry triangle, or even a magnetometer. I haven’t tried those but the Clinometer is truly amazing, especially since it employs sensors that are normally wasted on clumsy game controls. Who would have guessed the high precision and useful tasks they are really capable of?

MIME Browser 1.2 Released

$
0
0

Version 1.2 of MIME Browser, my free multi-platform EML viewer written in JavaFX, is now available for download. No big new features but a lot of small ones, including some user requests, as well as bug fixes and other tinkering.

  • Specify individual files (in addition to folders) directly on the command line, or via drag & drop. Note that MIME Browser must already be running for drag & drop to work since it’s a Java JAR file, not a native executable.
  • Save all parts of a MIME message to a user-selected folder. MIME Browser tries to guess a good unique file name if one isn’t recorded in the message.
  • Saving an individual part uses correct file extensions for text & HTML, and the save dialog defaults to the original file name.
  • MIME header fields are now shown in TextArea controls that take up more screen space but allow selecting & copying text, and more importantly feature a scroll bar when the field exceeds a single line.
  • An overdue “About” dialog with version number, release date, and links to email, official website, and the included ReadMe file.
  • For developers: The Javadoc class reference now includes UML diagrams, courtesy of yWorks UML Doclet.

These are just highlights – please see the WhatsNew file for the full change list. The screenshot below shows the new controls, described in more detail in the updated ReadMe file.

MIME Browser

Reception & Future

As mentioned, some changes were suggested by users. When I first built MIME Browser for my own use and as a JavaFX learning project, I had not imagined that anyone else could possibly be interested in a quaint offline email browser. Turns out I was quite wrong! MIME Browser has been downloaded over 300 times since the end of July, and I received a surprising number of comments both here and by email. Thanks everyone for the kind words, and rest assured I take note of all feature requests although I likely won’t implement all (or even most) of them. Here’s a quick update on wish list items that didn’t make it into this release:

List columns for MIME header fields (subject, to/from, etc.). That would be quite useful but requires reading every single MIME message before the list is composed, which I’m not currently doing unless full text search is enabled. This is potentially slow, and also requires a new configuration dialog to select columns. I may do this but it’s a lot of work…

Delete messages from within the application. I definitely won’t implement any “hard” file deletion, as I’d rather avoid angry emails from people who just accidentally deleted an irreplaceable message. Sadly, Java does not support recycle bins so I’d have to use the Java Native Access library which would quadruple the distribution size, just for that one feature. Probably not going to happen. An ugly workaround (at least on Windows) is to delete any desired files from within the Save dialog.

Combine multiple messages into a single report. This would be limited to plain text for the main message bodies, as I’m not going to integrate PDF or DOC generators. Besides, report generation is tedious work, so I think I’ll leave this one to commercial products.

JavaFX Tip: TableView

Lastly, here’s a tip for fellow JavaFX developers concerning a small but annoying cosmetic issue. The folder list is implemented as a TableView, and the first column (for the file name) should fill all space not occupied by the other columns. That proved surprisingly difficult to get right across all Windows DPI settings. The JavaFX TableView evidently scales its spacing at a different rate than the actual Windows DPI progression, perhaps for aesthetic reasons. So whatever root em factor I used for the first column, it would be either too wide or too narrow on some DPI settings, and by quite a big amount too.

The solution I ended up with is to dynamically size the column once the TableView has been laid out and its actual width is known. This is the case only after show() has been called on the primary stage, so that’s when I subtract the other (fixed and known) column widths from TableView.getWidth. However, that’s not quite correct yet since we also must account for the width of the scroll bar… and JavaFX provides no public API for that, nor for determining the “client” width of a control. You could find the scroll bar width by digging into the undocumented private styles of TableView but I really don’t like such hacks, as the structure and names might change at any time. So instead I just subtract one root em which seems to work out okay. (Do let me know if you find a case where it doesn’t!)

Java, RNG, Raster & Maps

$
0
0

Rounding up last month’s noteworthy archive entries…

Java for C# Developers: Andrei Rinea has started a nice tutorial series, Beginning Java for .NET Developers. His overview slides also mention a bunch of C# keywords missing from Java that I forgot to list on my page. I’ve added them now.

RNG Range Projection: Stephan T. Lavavej’s presentation rand() Considered Harmful discusses the range projection trap of Visual C++ rand(), along with many other issues, and demonstrates the new C++ 11 (VC++ 2013) facilities which fix them.

Typography Links: Beat Stamm’s The Raster Tragedy at Low Resolution is a textbook-sized multipart article that explains more than you ever wanted to know about display font rendering, including anti-aliasing and hinting. – The Big List of Flat Icons & Icon Fonts provides tons of links to free and commercial icon fonts, as well as tools for creating and manipulating them.

Miscellaneous Links: Jason Davies provides numerous data visualization samples, sometimes interactive, including an amazing collection of Earth maps. – The monumental Barrington Atlas of the Greek and Roman World (272 pages, US$395) has been digitized as a $20 iPad app. See Pedar W. Foss’s extensive review for more information on the book and app.

Last week also brought several Internet stories worth reading:

Stephansdom & Lightroom

$
0
0

Having victimized a neighborhood squirrel for my first experiments with raw digital images, I now decided to rectify the one notable omission in this summer’s Passau gallery. That’s the famous Stephansdom, or St. Stephen’s cathedral. It had been undergoing renovation which is now finished, and besides the annual Christmas market took place right in front of it.

  • All images are stored as full-size JPEGs in this Google+ gallery.
  • You do not need to log into Google or Google+ to view the gallery!
  • Click on each image to see a full-size JPEG with my description, if any.
  • When viewing a single image, click “Photo Details” for basic EXIF data.
  • Use the magnifying glass icon to zoom in, down to individual pixels.

The gallery includes seven exterior and five interior pictures, as well as one of an unrelated monastery church. Below is a low-resolution sample of the cathedral’s beautifully painted ceiling. In the rest of this post I’ll describe my new post-processing software, and my experiments with a polarizing filter.

Passau Tower

Adobe Photoshop Lightroom

I had used Sony’s own Image Data Converter to process my last set of photos, mostly because it’s free. While it works decently enough, you do get what you pay for: it’s infuriatingly slow, somewhat poor in features, and prone to crashing. So I snapped up Adobe’s well-regarded (Photoshop) Lightroom application when I saw it on sale. Unlike the full Photoshop, Lightroom specializes in managing, converting, and post-processing digital photos – i.e. anything other than manual drawing.

Lightroom differs starkly from Adobe’s usual overpriced bloatware with rental licenses. It’s cheap even at regular price, sold rather than rented, easy to use, completely stable, very powerful, and extremely fast to boot. All around Lightroom is far better than Sony’s IDC, and strongly recommended for anyone dealing with digital photos, especially though not exclusively in raw formats. Here’s my workflow so far:

  • Convert raw image data from my Sony NEX-7 into portable digital negative format for long-term storage. Lightroom supports Sony’s native format and can convert entire folders automatically, while also renaming each picture as desired.

  • Correct the substantial distortion of my Sony SEL-18200 ultrazoom lens in each photo. This is absolutely necessary when working on raw image data, and Lightroom happily includes the correct parameters for this and many other lenses.

  • Lightroom automatically applies a color profile that seems more natural than Sony’s own JPEG conversion. I also applied one or two default presets to each photo. “Punch” slightly heightens contrast in a way that I found always pleasant, and “Auto Tone” nicely fixed up my underexposed shots except for a few lost cases.

  • Lightroom also offers excellent noise reduction without losing too much detail. The NEX-7 sensor with its 24 megapixels tends to produce rather grainy raw images. I found that simply setting both Luminance & Detail to 100 in Lightroom’s “Noise Reduction” panel produces excellent results.

I used “Auto Tone” to lift the four interior shots of the cathedral from murky darkness to splendid colors. This includes the sample above which I’ve also uploaded with all Lightroom edits except for “Auto Tone” to demonstrate the difference. Naturally I couldn’t use a flash, and while I could have cranked the ISO higher I wanted to see what Lightroom could extract from a definitely underexposed picture. The results are very satisfying and only failed in extreme cases. For another shot of a nearby monastery church, I also played with Lightroom’s “Tone Curve” to achieve more dramatic lighting – see the gallery for details.

It’s worth noting that Lightroom edits pictures non-destructively. That is, until you explicitly export an image, all editing actions are procedurally recorded and reapplied to the unchanged original DNG file whenever you open it. You can jump back and forth in the editing history, and always reset to the original file. Remarkably, the application of even multiple edits is so fast (or Lightroom’s caching works so well) as to be virtually unnoticeable.

The generated JPEGs (at 85% quality as usual) are a lot bigger than those output by Sony IDC or in-camera: 4-12 MB rather than 2-4 MB. This might indicate a less effective JPEG compressor but I like to think that Lightroom preserves some extra detail compared to my earlier processes. Without a direct comparison that’s impossible to say for sure, though.

Circular Polarizing Filter

So far I had little opportunity to use my circular polarizing filter, a B+W XS-PRO MRC-Nano for which Amazon charges only one third of the astounding official price. You screw it on the lens, then rotate the filter to selectively block unwanted reflections and make the rest of the scene stand out more clearly. That works best with light coming in from the side, and during the early winter evening I had an excellent opportunity as sunset illuminated the cathedral’s towers with nearly horizontal rays.

The final three pictures of the gallery show (roughly) the same external view of the cathedral, with the filter turned between fully “open” and fully “closed” relative to the affected light. The cathedral itself remains unchanged, but you can clearly see the sky turning from a rather boring white to a stunning deep dark blue as the filter blocks reflections from water vapor in the atmosphere. Note that all these pictures had to be brightened by Lightroom’s “Auto Tone” because polarizing filters always block some light across the scene.


WebView, the other JavaFX UI

$
0
0

Aside from its native UI facilities, JavaFX provides a WebView that’s essentially an embedded HTML 5 browser. The underlying WebEngine is a modified Webkit engine which you can download here. Digging through the source code, JavaFX 2.2.4 uses Webkit version 535.21 – nearly two years old by now, according to the Webkit version tracker. Still, the current WebView could run all the HTML 5 sample applications I threw at it.

The one I’d like to showcase here is HTML5 Chess, a terrific open source project by Stefano Gioffré. Although sadly abandoned today, the final release is a complete working chess program written in HTML and JavaScript. You can play the demo online but for WebView hosting you should download the latest version. Extract the htmlchess folder from the archive, and then run this tiny JavaFX application from the directory that contains htmlchess:

package org.kynosarges;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class WebViewTest extends Application {

    @Override
    public void start(Stage primaryStage) {

        // path in current directory for WebEngine.load()
        final String html = "htmlchess/example.html";
        final java.net.URI uri = java.nio.file.Paths.get(html).toAbsolutePath().toUri();

        // create WebView with specified local content
        final javafx.scene.web.WebView root = new javafx.scene.web.WebView();
        root.getEngine().load(uri.toString());
        // root.setZoom(javafx.stage.Screen.getPrimary().getDpi() / 96); // JDK 8

        primaryStage.setTitle("HTML Chess");
        primaryStage.setScene(new Scene(root, 1100, 1000));
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}

There’s just one tricky part: WebEngine.load() requires absolute file paths. We want to load from a relative location, namely the current directory, so we need to fix up the location using Path and URI. If you’re running from within NetBeans, note that the current directory is the one above the dist folder containing the JAR file. Run your executable JAR and you should see the following window (after clicking “Both” to show both the 2D and 3D chessboard):

HTML Chess

HTML Chess (click for original size)

You may notice that the text is too small compared to the window title. That’s because WebView currently only supports text zoom, not full page zoom, so I cannot properly upscale the HTML content for my 150% DPI setting. Luckily the upcoming JDK 8 will add a zoom property that should allow full DPI compensation. Looking at the early access code, JDK 8 should also try to load relative file paths from the current user’s home directory.

JavaFX supports fairly rich interactions between the Java application and its hosted WebView. You can access the HTML document through the usual Java org.w3c.dom API, attach Java handlers to selected JavaScript events, and let JavaScript functions call back to arbitrary Java methods. Of course WebView can simply show remote websites or local help pages, but there are a few reasons to consider moving your main UI into WebView:

  • Tragically, WebView with the new JDK 8 zoom property should provide better high DPI support than native JavaFX controls…

  • Create two-tiered cross-platform applications, with a common baseline written in HTML/JS that runs everywhere, and extra features provided via embedded JavaFX deployment where possible.

  • Run HTML 5 apps on desktop systems that lack a sufficiently compatible web browser. You actually don’t need an installed modern JVM either, as the JVM is perfectly capable of private deployment. This can be automated with JavaFX native packaging, further improved by intelligent subsetting in JDK 8.

  • If you share the growing consensus that HTML/JS is the future of client-side programming, get ready for that future by targeting WebView, supplemented by Java(FX) for the parts where HTML is still lacking or JavaScript is too slow.

In the HTML Chess example, some obvious improvements would be better management of local PGN files, or an alternative Java implementation for the slow JavaScript turn prediction (enabled by “Machine Meditation Level”). The idea of a JavaFX client application with an HTML UI might seem weird at first, but I think it’s an interesting option – and probably a necessary one, given the rapid spread of HTML/JS as a standard UI technology.

Greatest Hits in 2012/13

$
0
0

Time for some self-indulgence! Back in March 2012 I started posting on Blogger but switched to the far superior WordPress.com within a month, and then to a self-hosted WordPress setup in April 2013. Since I only have WordPress stats from April 2012 onward and didn’t write a year-end review in 2013, I’ll combine both years in the following statistics. So here are this blog’s greatest hits, according to WordPress visitor tracking.

  1. Rise of Nations on Windows 8 is undisputed king with 11,766 views. I’m happy that so many people still know and play this great classic of strategy games!
  2. No .NET 4.5 for XP/2003 got 7,654 views from enterprise developers who couldn’t believe Microsoft would abandon them.
  3. JavaFX on iOS & Android is a late entry that instantly shot to 3,350 views. It’s a niche within a niche, but the Java universe is so huge that even its niches are pretty big.
  4. .NET 4.5 & Windows SDK 8.0 got 2,118 views, which is somewhat inexplicable since all I’m doing is briefly checking out that upgrade.
  5. Asus Xonar DGX on Windows 8 hopefully helped 2,051 viewers decide on buying and configuring their discrete sound card.
  6. Civilization V Fall Patch refers to the big 2012 update, so most of its 1,999 views are from that year. (I should have put Gods & Kings in the title, sorry!)
  7. Quest for EML Viewers was another surprise with 1,788 views. There’s still a ton of interest for these decidedly unsexy applications.
  8. Fall Patch for Civ5 Brave New World covers the big 2013 update for the final expansion and got 1,549 views.
  9. Windows 8.1 DPI Scaling Promises told 1,314 viewers that these promises were mostly hot air, as users soon discovered for themselves.
  10. Fixing Windows Programming had 1,290 views for showcasing DPI scaling failures and generally lamenting the state of the Windows ecosystem.

Additionally, the blog’s front page got 4,667 views. As usual with statistics compiled from JavaScript visitor tracking, views from RSS feeds or by visitors who disable JavaScript or block tracking scripts are not counted. WordPress.com is also usually blocked in China, and seems to have entirely dropped statistics for some early posts. With these caveats, total views for 2012 stand at 11,151 which increased nearly five-fold to 53,327 in 2013.

Since I’ve added Google Analytics in September 2013, I’ll get my statistics for 2014 and future years from there. Meanwhile, here’s what GA says about the last 3.5 months of 2013 regarding the most popular static pages on my main website:

  1. High DPI Settings in Windows got 11,337 views, matching the most popular blog post in one third of the time. This topic will only get hotter as pixel densities keep increasing.
  2. .NET Struct Performance is a microbenchmark that got 3,243 views, mostly due to being briefly reddited after getting linked in an MSDN discussion.
  3. WPF Drawing Performance is still holding strong at 2,711 views, probably because Microsoft’s attempt to push developers to WinRT has utterly failed.
  4. Check .NET Version with Inno Setup is another evergreen with 1,948 views, once again for technologies Microsoft wants to bury.
  5. DPI Scaling in Windows GUIs got 705 views as a developer adjunct to main article on high DPI settings.
  6. Civilization V Manual Addenda still got 676 views, even though I don’t really cover Brave New World which lacks a proper manual.
  7. Java for C# Programmers proved as popular as I suspected, with 632 views already. Java is thriving, not dying.
  8. LaTeX Typesetting with MiKTeX told 631 viewers about my PDF production setup. Like Java, TeX is an unkillable technology.
  9. Hexkit, my frozen but fully functional strategy game system, attracted 568 views.
  10. Comment Reflower for Visual Studio is another older project that got 467 views.

All told, GA recorded 27,784 page views which would scale up to over 95,000 views for the entire year. Let’s see if we can break 100,000 views next year…

Napoleon’s Unlikely Career

$
0
0

Sociologist Randall Collins has published another fascinating essay-length post, this time on the illustrious career of Napoleon Bonaparte and the old question of talent versus luck. The single worst thing about the article is the title, Napoleon as CEO: A Career of Emotional Energy, which sounds like something written by robots to fill the space between advertising on Huffington Post. But don’t worry – the article itself barely mentions CEOs, and the fluffy-sounding term “emotional energy” denotes real and important phenomena such as one’s level of activity, confidence, and enthusiasm. Below I’ve summarized some core passages. You should read the whole thing, and also Collins’ earlier articles on revolutions which provide some relevant background.

The Accidental Hero

Napoleon hailed from Corsica but could attend French elite military schools, as his father was both politically important and a French loyalist. This combination and the time of his birth proved the lucky cornerstones of his career. Napoleon had the requisite education and connections, yet was too young and too distant from the centers of power to be drawn into the vicious fights surrounding the revolution. Instead, he learned political organization in Corsica, “the big fish in a small pond,” and enjoyed career opportunities provided by the mass emigration of aristocratic officers. When the warring factions on the mainland had exhausted themselves, he was the ideal outside candidate to restore order.

Leading political actors in a period of violent struggle are going to knock each other off. In France, once the royalists were gone, the radicals turned against the moderates; and when they were gone, turned against each other. Eventually when most people are exhausted, there is room for an outsider detached from the ideologically polarized factions to act as peace-maker, establishing a more stable regime. If the structural bases for contending forces are still strong, this outside restorer of order will have opposition that tends to provoke an authoritarian solution; but the restorer will have support in public opinion, in the time-period when they are tired of seemingly endless ideological projects and violent strife. Such a detached outsider cannot be entirely without network connections, but they must be distant and flexible enough so that he is not brought down by old faction struggles. In other words, the situation will select someone like Napoleon in terms of age, peripheral sphere of activity, and multi-sided connections with the center

Once in power, Napoleon was certainly an exceptionally capable organizer. However, his new legal code and centralized bureaucracy merely accelerated a course that had long been set by the French kings, against the resistance of the old estates; and the role of master coordinator naturally manifests in times of revolutionary change.

In hero-centric or person-centered historical narratives, too much credit – too much causal force – is attributed to one person. Nevertheless, when big structural momentum is swinging but is held up by struggles or chaotic distractions, a structural opening is available for a regime to consciously and deliberately carry through the trend so that the transition is clear. […] When this happens, the leader of the team who does the reorganizing gets a great reputation, not only among contemporaries but in historical downstream. The days and years when this is going on are going to be times of intensely coordinated action; and those are the conditions where someone can play the role Napoleon played – so much to do that is consequential and important; that involves many networks of people, all of them crossing at a center where the energizing leader meets them.

The Military Genius

Napoleon was trained as an artillery officer, and his first successes include the siege of Toulon in 1794 and the suppression of the royalist uprising at the Tuileries in 1795. The latter is remarkable for its brutal but clear-headed efficiency, foregoing the usual practice of starting with warning shots. Napoleon recalled:

I made the troops fire ball at first because to a mob who are ignorant of firearms, it is the worst possible policy to start out by firing blanks. For the populace, hearing a great noise, are a little frightened after the first discharge but, looking around them and seeing nobody killed or wounded, they pluck up their spirits, begin immediately to despise you, and rush on fearlessly, and it becomes necessary to kill ten times the number that would have been killed if ball had been used in the first place.

In the field, Napoleon almost always succeeded thanks to his excellent organization that allowed him to concentrate forces faster than the enemy, and also due to his innovative use of massed light artillery alongside or instead of infantry lines.

As the French officer Charles Ardent du Picq was to document for the Crimean War, infantry have a strong tendency to misfire, or fail to fire entirely, in the stress of closely confronting an enemy. Since most muskets were inaccurate except within 40 yards (wait ‘til you see the whites of their eyes), a battle charge was a war of nerves; if the defenders could not get off their volley at the right time and with sufficient coordination, the oncoming attackers with their bayonets would usually panic defenders into a retreat. Napoleon, who was an excellent observer of such things, recognized that artillery was more accurate and easier to keep under emotional control than infantry.

Finally, the revolution had supplied a huge conscript army which adored Napoleon for his exceedingly fair, competent, and tireless leadership. Napoleon kept winning, but his military successes ultimately trapped him in a self-image of invincibility.

His ambassador to Russia describes a discussion in 1811 on whether to go to war (with all due warnings about the Russian plan to retreat into the depths of the country and let winter defeat the French): “After listening to me attentively, the Emperor began enumerating the troops and resources at his disposal. When he reverted to this theme I realized that all hope of peace was at an end, since it was enumerations of this kind which, more than anything, intoxicated him…” After making up his mind, Napoleon cheered up, and left his critic with jokes and good humor. [Caulaincourt]

Attacking everyone who wouldn’t join the embargo against England eventually drove Napoleon to Russia, where he lost both his army and his prestige. This itself increased the number of his enemies who were also catching up with French tactics and organization. Napoleon ceased working miracles on the battlefield and was deposed.

JavaFX Text Icons as Images & Files

$
0
0

There are plenty of high-quality icon fonts for scalable user interfaces, and drawing them directly as Text into JavaFX UIs is simple. But what if you need the icon as an Image or a disk file? That’s not hard to achieve, either, but there are some non-obvious steps and many Java APIs to navigate. So I put the whole procedure together in this tutorial.

To begin with, here are the JavaFX package imports used by the rest of the code. Any AWT packages we need are explicitly specified inline.

import javafx.geometry.*;
import javafx.scene.*;
import javafx.scene.canvas.*;
import javafx.scene.image.*;
import javafx.scene.paint.*;
import javafx.scene.text.*;

First we set the desired image size and create a matching JavaFX Canvas. I’m using a 256×256 square since that’s a standard size for icons.

final double size = 256;
final Canvas canvas = new Canvas(size, size);
final GraphicsContext gc = canvas.getGraphicsContext2D();

Now we center the desired text on the Canvas. Note that the Font constructor doesn’t take a pixel size, but rather a point size specifying the font’s baseline distance. This means you cannot a priori determine the correct Font size to precisely fill our Canvas with any given icon. The Canvas pixel size is usually a good heuristic for the Font point size, but then you’ll simply have to check the output and tweak as necessary, e.g. with the factor 1.3 shown here.

final Font font = new Font("Ionicons", 1.3 * size);
gc.setFont(font);
gc.setTextAlign(TextAlignment.CENTER);
gc.setTextBaseline(VPos.CENTER);
gc.setFill(Color.BLACK);
gc.fillText("\ue707", size / 2, size / 2);

This sample text is a star icon (icon-star) from the free Ionicons font, which must already have been loaded using Font.loadFont(). Our text is now drawn on a Canvas but we want an Image, so let’s take a snapshot. The SnapshotParameters force the background to remain transparent, otherwise snapshot() would paint it solid white.

final SnapshotParameters params = new SnapshotParameters();
params.setFill(Color.TRANSPARENT);
final WritableImage snapshot = canvas.snapshot(params, null);

As a final step, we want to save the image to disk for further use. Here we have a small problem because JavaFX does not support creating image files. Fortunately, AWT does and JavaFX provides a bridge method.

final java.awt.image.BufferedImage image =
    javafx.embed.swing.SwingFXUtils.fromFXImage(snapshot, null);

final java.io.File file = new java.io.File("icon.png");
try {
    javax.imageio.ImageIO.write(image, "png", file);
}
catch (java.io.IOException e) {
    // error processing
}

The sample code uses PNG output which is appropriate for icons and supports transparency, but ImageIO also offers other standard formats. And so we finally have the 256×256 PNG file you see below! Naturally you can use the same procedure to save any other text, or indeed any arbitrary Node content.

Ionicons Star

Guesswork on Windows & Hybrid Devices

$
0
0

Microsoft’s future has become even less clear than usual since Steve Ballmer announced his resignation as CEO last year. The search for a replacement turned out to be protracted, most likely because Ballmer and his old pal Bill Gates still sit threateningly on the board. As Jean-Louis Gassée remarked, “any candidate willing to accept this road to failure is automatically disqualified as being too weak.” Consequently, Ford’s Mulally has already dropped out of the running. So we can look forward to many more months of corporate drama, quite likely churning through some ineffectual CEOs from internal recruiting as the company struggles to find its new long-term strategy.

Meanwhile, let’s take a look at more tangible things, namely the status and probable future of the WinRT API which underlies Windows RT and Modern/Metro mode in Windows 8. The status is quickly summarized: it’s a zombie. One by one, OEMs dropped Windows RT tablets from their product lineup, citing total absence of demand. A year after the launch of Windows 8, touchscreens remain an optional rarity among laptops. Apple ridiculed the concept of hybrid devices during its iPad Air reveal – and went on to enjoy some more excellent sales of its traditional product lines.

Stack Overflow questions demonstrate less interest in Windows Store than even in Windows Phone. The developers of the one prominent indie game on Windows Store, Skulls of the Shogun, discovered that Windows 8 exclusivity is a quick road to near-bankruptcy. And this weekend, HP proclaimed “Windows 7 is back by popular demand”, i.e. once again the default for all desktop systems. Having suffered through Windows 8 and 8.1 on a desktop, I can only approve. Noted Windows fan Paul Thurrott bluntly said that “Windows 8 is tanking harder than Microsoft is comfortable discussing in public.”

Windows 9 “Threshold”

Thurrott also reported some rumors about the next Windows version, codenamed “Threshold.” It’s going to be called Windows 9 and probably released in 2015, after another Windows 8.1 service pack in 2014. Apparently the long-awaited return of a (sort of) Start menu and the ability to run Metro apps in desktop windows arrive in Windows 9, rather than the speculated intermediate Windows 8.2 release. That’s interesting because it’s clearly a marketing decision – neither feature is difficult to implement, as demonstrated by small third-party utilities that have provided them for a while. Consequently, Thurrott sees the Windows 9 branding as a move to “distance itself from the Windows 8 debacle,” much like the fixed Windows Vista was released as Windows 7 to keep people from boycotting it on name alone.

Another long-expected move is the merger of the Windows Phone and WinRT APIs which should never have been incompatible in the first place. Microsoft’s Julie Larson-Green declared last November that the triple split in Windows Phone, Windows RT, and full Windows wasn’t going to last. The exact nature of the merger is as yet unclear, but I would expect WinRT to move towards Windows Phone which is by far the more popular platform (even though that’s not saying much). Here are two major benefits these changes should bring:

  • Removal of jarring context switches between desktop and Metro apps. In particular, desktop users will remain in control of their desktop no matter what they’re doing.
  • Unification of all mobile apps under one single API, from phones to tablets to mobile apps running in desktop windows. Only the legacy Win32 API remains separate.

These are certainly improvements but they come years too late, after the ill-conceived Windows 8 and the incompatible mess of WP7/WP8/WinRT. It’s also far less than I had hoped for when I had first heard about Surface and WinRT. The idea of one unified API serving hybrid devices is dead. With Win32 continuing to exist separately from WinRT, all desktop applications will simply continue to use Win32 and ignore WinRT. This means those applications will continue to work poorly on touch screens, and not at all on mobile devices which don’t support Win32. Conversely, since Win32 continues to monopolize Windows productivity software, WinRT will become the “Nokia API” for simple phone apps, as there’s no point trying to compete with superior Win32 software in productivity space.

Developers, Developers…

From a developer perspective, I think the only way Microsoft could yet make hybrid Windows work is to add the required downscaling functionality to Win32. Make it mostly automatic, backward compatible, and easy to use, then hope for the best. Creating yet another dedicated API is probably a non-starter since developers have learned the hard way to distrust new Microsoft APIs, as David Sobeski argues in Trust, Users and the Developer Division:

The 2000s were all about breaking the platform every year. Developers got fatigue and would give up. It was the decade that changed the trust model for that every developer had with Microsoft. Eventually developers just gave up. […] At the end of the day, developers walked away from Microsoft not because they missed a platform paradigm shift. They left because they lost all trust. You wanted to go somewhere to have your code investments work and continue to work.

Silly old Visual Basic is not a language I miss, but Microsoft happily abandons even its best and most popular frameworks – see Nathan Fouts’ Reflections on XNA, or the comprehensive overview Microsoft versus Developers. For business applications, Jonathan Allen observed that “we have more options than ever before, and they are all dismal.” Abandoned .NET APIs or inadequate WinRT: take your pick! Unsurprisingly, developers prefer the safety of Win32 – or cross-platform solutions not controlled by Microsoft.

Speaking of which, Microsoft’s own applications are busy moving to cross-platform HTML5. This includes the well-established Office 365 but also – wait for it – Erich Gamma’s Visual Studio Online. Clearly even Microsoft doesn’t want to bet its future on WinRT. As a logical conclusion, the rumored Nokia “Normandy” handset puts a Metro look and Microsoft services on top of a custom Android installation. If profits are coming from device sales and service subscriptions anyway, the operating system becomes irrelevant.

Devices & Services

Microsoft does need a “devices & services” strategy to stay relevant with consumers. You cannot sell $100 (or whatever) Windows licenses to people who are used to free Apple and Android OS updates. Windows needs to be free, and that in turn requires profits coming from elsewhere – hardware, app store fees, service subscriptions. If Microsoft cannot get that business model to work then they will have to leave the consumer business entirely and only sell systems with service contracts attached, meaning almost exclusively to enterprises.

The devices part of this strategy is going to be difficult. The company is far too late in the game, as Android has already thoroughly commoditized mobile hardware. Apple hogs the luxury niche with gold-plating, superior mobile software, and a uniquely dedicated customer base. Microsoft might emulate the first but cannot hope to compete with the rest.

A profitable computing device by Microsoft would have to be a high-quality traditional laptop, with excellent build quality and no preinstalled crapware. That would leverage Microsoft’s own strength, namely the vast selection of existing desktop software. Touch input and digitizer pen would be quite welcome, too – imagine precision drawing and photo editing, comfortable web and e-reader navigation, or perhaps entering moves in strategy games. I’m still hoping Microsoft will get a clue and eventually make one of those.

Hybrid Devices?

However, any device focused on traditional desktop software needs a screen size well above 10″ and a good built-in physical keyboard. The true hybrid device represented by the Surface is an attractive idea, but only if and when there’s true hybrid software ready to go with it. Microsoft’s duct-taping of a phone OS with no software to an unchanged desktop did absolutely nothing to accomplish that. If I need separate apps – even web browsers! – for touch and desktop mode, I might as well use an iPad side-by-side with a Windows 7 laptop. At least I’ll enjoy Apple’s superior app store.

For true hybrid functionality, Microsoft would have to tackle the substantial challenge of adapting and enhancing Win32 for mobile devices, as noted above. I’m not sure if this is even possible, but the failure of Windows 8 has demonstrated that it’s pointless to introduce another new mobile-focused API. The competitors are too well established, including HTML5 as the emerging standard for new cross-device and cross-platform applications.

Instead, hybrid devices are more likely to emerge from the existing mobile duopoly. Despite its jokes about the Surface, Apple is supposedly preparing a bigger iPad Pro, and several PC manufacturers are building Android desktops with added window managers. Scaling up software that originated on phones and small tablets is certainly going to present its own challenges, but both platforms already offer a broad selection of productivity software that should readily benefit from bigger screens. I think it’s by no means unlikely that Android will be the “new Windows” – perhaps a bit clunky and ugly, but scaling quite happily from phones to desktops… and finally suited for hybrid devices.

Viewing all 253 articles
Browse latest View live