Excellent Intro to Qt Quick

I came across this video that provides a great introduction to the Qt Quick controls in Qt 5.

It’s very interesting to see how a fully fledged, cross platform app that consumes a Web API can be developed in just over 15 minutes almost without a single line of code.

After seeing this video, I’ve been looking a little more into how C++ can be integrated into Qt Quick apps and, unfortunately, it doesn’t seem to leverage the signal-slot mechanism common to QWidgets applications.

This is a problem, since it means that reusing a large codebase might be a little more involved than just doing a seamless transition from writing QWidgets to slowling rolling out side-by-side Qt Quick panels.

Nonetheless, it’s very impressive and it’s definitely worth taking a look at if you need to develop a quick desktop UI in 10~15 minutes.

Herb Sutter’s “Why C++?” Talk Sum-up

This is a sum up of the points I believed to be the most interesting in Herb Sutter’s recent “Why C++?” talk. The video was published on Microsoft’s Channel9, but I have also embedded it here for convenience.



The talk starts with a recap on C++’s history. Then Herb Sutter talks about the rise of “Coffee-based” languages (i.e. managed languages) and how for about a decade (from 1999 to 2009) the industry seemed to accept trumping performance for productivity. Mr. Sutter clearly states he believes this is a perfect valid point, however, he notes that the opposite is also true: trumping productivity for performance is valid (and necessary) in many scenarios. The talk focuses on three such scenarios: Mobile, Datacenter and Desktop.

Managed Languages

Before moving into these scenarios, the talk focuses on the subject of managed languages. Mr. Sutter referenced Windows “Longhorn”, and its attempt to push managed languages as a first class citizen in Operating Systems. He evoked a quote of the time stating that “All new Windows APIs would be managed”.

However, as the OS was being developed, they realized that managed languages didn’t have the performance, deployability or serviceability (among others) required to develop an Operating System. That’s why Windows nowadays is all C and C++ and will probably stay that way.

Furthermore, demanding applications, like vision Apps running on mobile devices and Kinect applications, further emphasize the need for high performance in languages. According to Mr. Sutter, these applications are breathing new life into performance languages, and have been triggering a “C++ Renaissance”.

“Was .NET All a Mistake?” Of course it wasn’t, Mr. Sutter states. “But it can’t do everything C++ can, just like C++ can’t do all .NET can”. Managed languages were the hammer that made everything look like a nail during the last decade. Today, the focus is on high demanding applications that need performance. The “king” is Performance per Watt, per Cycle, per Transistor: Performance per Dollar.

Mr. Sutter takes some time to explain the drawbacks he sees on managed language performance. He quotes several reasons including: Garbage Collection, JIT services, lack or no control on caching and memory layout, etc. Mr. Sutter states that some of these drawbacks can be helped, but that programmers basically have to fight against the language in order to do so.

According to Mr. Sutter, except for the last decade, performance has always been the main reason to pick a programming language, and starting two years ago, it is now again.

Mobile

“Let’s talk about Mobile”. Mobile devices are all about battery, size and bigger experiences on smaller hardware.

Smart Phones are small computers. If we look at the main platforms today: iPhone is programable in Objective-C, C and C++. All native code. Android supports Java, but the Native Development Kit is essential when we need performance.

Mr. Sutter recalls it has not always been this way. The original iPhone preached Javascript development, but for its second version it went all native. Android started preaching Java development, and now supports native development as well. Windows Phone 7 started off with .NET, but by looking at the other two platforms, one can guess what will happen in the near future. The trend is to go all native.

What happens with Web Apps? According to Mr. Sutter they are and will still be there, but will be used as a backup when a native App does not exist for the task. We can look at Google+ for an example. Everyone uses the native App, and “default” to the Web App when there is no native App for the platform being used. Why? Mr. Sutter says it is because of their Performance.

Datacenter and Desktop

What happens in the Datacenter? Citing a study, Mr. Sutter claims that the biggest cost is Hardware and Power. These account for 88% of the total cost of running a Datacenter. Performance/Watt has a direct impact on this, and it can be improved by having more efficient programs.

Mr. Sutter states that if we could reduce Time and Space requirements, we could improve efficiency. Efficiency is “king” for managing the costs of the Datacenter.

Quoting Bjarne Stroustrup: “My biggest contribution to the fight against global warming is C++’s efficiency: Just think if Google had to have twice as many server farms! Each uses as much energy as a small town. And it’s not just a factor of two… Efficiency is not just running fast or running bigger programs, it’s also running using less resources.”

Regarding the Desktop Mr. Sutter notes how being efficient on power and heat also matters in the Desktop. I believe this case is particularly true for laptop devices.

C++11 and the next Decade

Mr. Sutter states: “C++11 is upon us”. Not only does C++11 have a lot of new features, but Mr. Sutter emphasizes how these will be available and also required soon. Programmers will be required to use the new Features in C++11 in order to take advantage of new frameworks (like C++ AMP). “C++ matters again as a first class system”.

The talk concludes by presenting view on what will come after the C++ Renaissance decade (2009-2019). Moore’s law is going to end. It will not happen over night, though, according to Mr. Sutter. The industry will be able to see the end coming when the end of we start obtaining diminishing returns.

Efficiency-oriented languages have a bright future, and they are going to stick around.

To end his presentation, Herb Sutter states that “The answer to the question <<Why C++?>> is <<Why, C++, of course!>>.”

QuakeCon 2011 Keynote

John Carmack, founder and lead developer of Id Software opens the 2011 QuakeCon conference.

In this Keynote, John Carmack discusses some implementation details of the engine powering Id’s next game: Rage. He addresses the issues faced while developing the engine for the PC, the XBox 360 and the PlayStation 3 and the problems they had to address while trying to maintain a steady 60 FPS while managing the game’s huge data sets.

The talk also emphasizes the importance of using Static Analysis tools to find bugs in large code bases. Some tools mentioned include “Microsoft Analyse”, “PVS Studio” and “PC lint”.

John Carmack also shares his views on in-game script interpreters. He mentions these are hard to debug and develop as well as the fact that they significantly impact performance and game quality. He recommends not going with dynamic languages, but instead having a strong type system and a very restrictive language. His views are that it is better to find bugs “as early as possible”, ideally at script compile time. He sees the best direction to go is with a Java-like subset of C++: a very strict, C or C++-ish language.

Finally, he closes the Keynote by looking back into the “early days” of game development and comparing that to the process studios have to go through today. He also announces the upcoming release of the Doom 3 source code later this year and recommends getting a copy of Doom 3 from Steam.



YouTube link.

Breathtaking capture of Aurora Borealis

This incredible video was created by filming a series of nights in Norway.


The Aurora from Terje Sorgjerd on Vimeo.

I spent a week capturing one of the biggest aurora borealis shows in recent years.

Shot in and around Kirkenes and Pas National Park bordering Russia, at 70 degree north and 30 degrees east. Temperatures around -25 Celsius. Good fun.

Visit my Facebook page http://www.tesophotography.com for more information.

If you are interested in hiring me or licensing my clips contact me at terjes@gmail.com.

Available in Digital Cinema 4k.

Big thanks to the guys over at http://dynamicperception.com for their amazing all-in-one motion control dolly.

Music is Gladiator soundtrack “Now we are free”

I first saw this video here.

History of the Build Engine

Today I came across a video in YouTube featuring the history of Ken Silverman’s Build Engine.

I remember spending countless hours, when I was young, using the Build tools for designing and scripting levels for games such as Duke Nukem 3D and Shadow Warrior, as well as creating new artwork and even editing the game configuration files (CON files).

Build Engine’s CON files were my first approach to programming, way before I learned how to program using C++. They used to have a weird syntax, but you could do all sorts of changes to the game. Even defining new monsters and items was possible thanks to CON files.

Here’s the video. It’s about 10 minutes long, but completely worth it.