Programming

Dependency injection (DI) can be a somewhat difficult concept to grasp and even more confusing to apply to new or existing applications. Jesse Smith shows you how to perform DI without an injection container by using either C# or Java.

Introduced by software engineer Robert Martin in the early 2000s, the five basic SOLID principles for good object-oriented programming design discussed in this article make code-bases more clean and maintainable. Jesse Smith shows you how the principles discussed here enable you to create more flexible, robust and reusable code.

There are numerous problems with threads in Python, but Python can work around almost all of these issues with coroutines, which let you have many seemingly simultaneous functions in your Python programs. Brett Slatkin discusses coroutines in this excerpt from Effective Python: 59 Specific Ways to Write Better Python.

A string is simply a sequence of characters. Like most entities in Ruby, strings are first-class objects. In everyday programming, we need to manipulate strings in many ways. We want to concatenate strings, tokenize them, analyze them, perform searches and substitutions, and more. In this chapter from The Ruby Way: Solutions and Techniques in Ruby Programming, 3rd Edition, Hal Fulton and André Arko show you how Ruby makes most of these tasks easy.

An important feature of the API framework in the Visual Studio 2015 compiler is the capability to create your own diagnostic, code fix, and refactoring projects. Bill Wagner, author of Effective C#: 50 Specific Ways to Improve Your C#, Second Edition, shows how you can use these APIs to automate everyday tasks such as finding code that lacks enclosing braces - and then adding them automatically.

In addition to playing video and audio files, the iOS 7 AV Foundation Framework APIs let you use your iOS device's camera for scanning. Wei-Meng Lee shows how to create an application to scan barcodes.

This chapter from Universal Windows Apps with XAML and C# Unleashed begins by examining a very important topic, although one that many developers take for granted: the threading model for universal apps. This background is especially helpful for the advanced feature of writing an app that displays multiple windows, which is the second topic in this chapter. The third and final topic—navigating between a window’s pages—is a feature leveraged by just about every real-world app.

Everybody’s doing it. And by “it,” we mean blogging. You know you want to. You’ve got something to say and people need to hear it. Follow these down-to-earth tips and tricks about getting your feet wet in the world of technology blogs.

In this excerpt from Spring Framework LiveLessons (Video Training), Josh Long shows you how to use bean lifecycle callbacks, including the initializing bean interface, the disposable bean interface, @PostConstruct and @PostDestroy methods, and the smart lifecycle interface.

John Lakos interviews Alexander Stepanov and Daniel Rose, authors of From Mathematics to Generic Programming, on their new book, why it applies to everyday programmers, and their positions on some closely related technical issues — including value semantics, concepts, contracts, and polymorphic memory resources — facing the C++ Standards Committee today.