Archive

Archive for the ‘Fresh News’ Category

C9 Lectures: Core C++

July 19th, 2012 No comments

We know lots of folks are either coming back to C++, coming to C++, or have never left C++. This lecture series, in n parts, is for all of you! Only STL can make that work (novice, intermediate, and advanced all bundled together and presented in a way only STL can do.)

C9 Lectures: Stephan T. Lavavej – Core C++

“Deep C (and C++)” presentation by Olve Maudal and Jon Jagger

July 18th, 2012 Comments off

Programming is hard. Programming correct C and C++ is particularly hard. Indeed, both in C and certainly in C++, it is uncommon to see a screenful containing only well defined and conforming code.Why do professional programmers write code like this? Because most programmers do not have a deep understanding of the language they are using.While they sometimes know that certain things are undefined or unspecified, they often do not know why it is so. In these slides we will study small code snippets in C and C++, and use them to discuss the fundamental building blocks, limitations and underlying design philosophies of these wonderful but dangerous programming languages.

This content has a CC license. Feel free to use it for whatever you want. You may download the original PDF file.

 


Free Keynote Mockup Templates for Prototyping Mobile, Web and Desktop Apps

July 16th, 2012 Comments off

With Keynotopia Mockup Bundle, you can sketch user interfaces using Apple Keynote.

When your mockups look like simple hand-drawn screens, it’s easier to get feedback on layout and structure, without getting distracted by the detail.

Keynote mockups are better than hand-drawn sketches because you can iterate on them and modify them without having to redraw them.

Tags: , , , , , ,

Overview of Windows Runtime C++ Template Library

May 26th, 2012 No comments

The Windows Runtime C++ Template Library (WRL) is a COM-based template library that provides a low-level way to use Windows Runtime components.

The Windows Runtime is implemented by using Component Object Model (COM) technology. COM depends on reference-counting to manage the lifetime of objects, and other housekeeping techniques, and on testing HRESULT values to determine whether an operation succeeded or failed. To successfully write a COM app or library, you must carefully follow COM rules and techniques.

The Visual C++ component extensions (C++/CX) is a high-level, language-based way to use Windows Runtime components. Both the WRL and C++/CX simplify the writing of code for the Windows Runtime by automatically performing COM housekeeping tasks on your behalf.

more

Additional info: Visual C++ WinRT FAQ – WRL vs C++/CX

  • WRL is a non-extension-based ISO compliant alternative to using C++/CX when targeting WinRT. It’s fairly obvious that C++/CX is far simpler to use than WRL, specially when creating components (consuming components is relatively easier).
  • The big thing with WRL is that you can use ISO C++. You don’t have to learn a new syntactic extension that you cannot use outside the Microsoft-world. Most C++ devs would feel comfortable using WRL, specially if they’ve used ATL before. That said portability is a myth, since WRL code is as tied into Windows as would be C++/CX code.
  • Do you want to totally avoid exceptions (perhaps to remain in sync with existing code that doesn’t use exceptions)? If so, you have to use WRL since C++/CX uses exceptions.
  • Performance wise, will you see any difference? As stated above, C++/CX uses exceptions while WRL uses HRESULTs. So the performance implications of using exceptions will obviously come into play. There is also the non-trivial conversion between HRESULTs and RT exceptions. Outide of that, I don’t think there’s going to be any noticable difference in performance.
  • Not sure to what extent you can do this, but since WRL exposes the underlying COM architecture, you can fine-tune your code to some degree (since WinRT is built on top of COM). I haven’t read or heard about any scenarios where this has actually made a difference.
  • The psycological aspect. While this is the least technical of the reasons, it might be the biggest factor here. Many C++ devs would simply hate anything that they see as foreign syntax. And C++/CX is certainly not ISO C++. Its close similarity with C++/CLI (which many C++ devs found disgusting) doesn’t help either. If your C++ dev team comprises mainly of a bunch of these guys, I reckon it’d be wise to just use WRL.

 

Windows 8: Unit testing native code

May 23rd, 2012 No comments

Unit testing native code with Unit Test Explorer

In Visual Studio, you can create unit tests for unmanaged code written in C++. Unmanaged code is sometimes referred to as native code.

The following procedure contains the essential information that will get you started. The later sections provide a walkthrough that describes the steps in more detail.

patterns & practices – Hilo: dev a Windows Metro style app using C++ & XAML

Hilo guides you though the development of a Windows Metro style app. The Hilo sample is a photo viewing and tagging app using C++ and XAML. Hilo demonstrates how to create live tiles, virtualize scrolling, suspend and resume the app, implement search, share and other contracts.

Verifying Code by Using Unit Tests

The Visual Studio 11 unit test tools are designed to support developers and teams who incorporate unit testing in their software development practices. Unit tests give developers and testers a quick way to look for logic errors in the methods of classes in Visual C#, Visual Basic, and Visual C++ projects.

Shawn Achor: The happy secret to better work

March 15th, 2012 No comments

“If we study what is merely average, we will remain merely average.” (Shawn Achor)

About this talk

We believe that we should work to be happy, but could that be backwards? In this fast-moving and entertaining talk from TEDxBloomington, psychologist Shawn Achor argues that actually happiness inspires productivity.

About Shawn Achor

Shawn Achor is the CEO of Good Think Inc., where he researches and teaches about positive psychology.

Tags: , ,

Clean memory

February 20th, 2012 No comments
// Swaps the process out of physical RAM memory
SetProcessWorkingSetSize(GetCurrentProcess(), (SIZE_T)-1, (SIZE_T)-1);

Можно ещё делать так, когда память процесса превышает некую “норму”:

EmptyWorkingSet(GetCurrentProcess());

pragma warning

February 3rd, 2012 No comments

#pragma warning – enables selective modification of the behavior of compiler warning messages.

Additional “pragma warning” parameter is suppress – pushes the current state of the pragma on the stack, disables the specified warning for the next line, and then pops the warning stack so that the pragma state is reset.

Also __pragma() can be used instead of #pragma which allows it to use inside macros:

#define __const_cond( c ) \
 __pragma(warning(push)) \
 __pragma(warning(disable:4127)) \
 ( c ) \
 __pragma(warning(pop))

Windows Sysinternals and Sysinternals Live

February 2nd, 2012 No comments

The Sysinternals web site was created in 1996 by Mark Russinovich and Bryce Cogswell to host their advanced system utilities and technical information. Microsoft acquired Sysinternals in July, 2006. Whether you’re an IT Pro or a developer, you’ll find Sysinternals utilities to help you manage, troubleshoot and diagnose your Windows systems and applications. If you have a question about a tool or how to use them, please visit the Sysinternals Forum for answers and help from other users and our moderators.

Sysinternals Live is a service that enables you to execute Sysinternals tools directly from the Web without hunting for and manually downloading them. Simply enter a tool’s Sysinternals Live path into Windows Explorer or a command prompt as http://live.sysinternals.com/<toolname> or \\live.sysinternals.com\tools\<toolname>.

You can view the entire Sysinternals Live tools directory in a browser at live.sysinternals.com.

Or you can map the server to your drive:

net use y: \\live.sysinternals.com\tools

Windows common controls demo

December 27th, 2011 No comments

CppWindowsCommonControls contains simple examples of how to create common controls defined in comctl32.dll. The controls include Animation, ComboBoxEx, Updown, Header, MonthCal, DateTimePick, ListView, TreeView, Tab, Tooltip, IP Address, Statusbar, Progress Bar, Toolbar, Trackbar, and SysLink.