Skip navigation
Help

energy

warning: Creating default object from empty value in /var/www/vhosts/sayforward.com/subdomains/recorder/httpdocs/modules/taxonomy/taxonomy.pages.inc on line 33.

After a string of strong supporting roles, Jude Law returns to the spotlight in Dom Hemingway. And what a noisy, colorful return it may be.

The gangster pic stars Law as a safecracker who’s just spent twelve years in prison for keeping his mouth shut. Once out, he reconnects with his old life by trying to collect his due from his boss (Demián Bichir) and make up with his estranged daughter (Emilia Clarke). Richard E. Grant plays Dom’s best friend, who’s along for the ride.

The first trailer has just hit, and you can check it out after the jump. Be warned that it’s NSFW, unless your own boss doesn’t mind seeing Law’s bare bottom on your computer screen.


[Digital Spy]

Law’s return to center stage comes not a moment too soon. He seems to be at the top of his form here, oozing charisma even as it becomes obvious that Dom is a terminal screw-up.

0
Your rating: None

An anonymous reader writes "For many decades, we have been relying on fossil resources to produce liquid fuels such as gasoline, diesel, and many industrial and consumer chemicals for daily use. However, increasing strains on natural resources as well as environmental issues including global warming have triggered a strong interest in developing sustainable ways to obtain fuels and chemicals. A Korean research team led by Distinguished Professor Sang Yup Lee of the Department of Chemical and Biomolecular Engineering at the Korea Advanced Institute of Science and Technology (KAIST) reported, for the first time, the development of a novel strategy for microbial gasoline production through metabolic engineering of E. coli."

0
Your rating: None

This text was originally posted on my personal blog.

A while ago I stumbled upon a talk submission form for an event called The Developers' Conference. It's a gathering of people who want to learn a little bit more about topics like architecture, digital marketing, Arduino and others. Sure enough, games were going to be discussed there too.

The event was close to at least four universities that have game courses, so I thought many young faces would show up. Right after I saw the submission form, I started thinking what I could tell those people that want to be a part of the game developing scene here in Brazil. It didn't take long before I realized I wanted to share with them the things I messed up on the past two years and maybe help them be more aware of some of the tricks you can fall for when you are too eager or too optimistic to do something.

When my talk got accepted I wanted to validate my arguments with other people's own experience. That was something I didn't have time to do and this post is an attempt to fix that. What this post is not, however, is a receipt to follow blindly. Feel free to disagree with me and bring your ideas to the table.

Here's what I've come up with:

0
Your rating: None

An anonymous reader writes "Hungarian photographer Adam Magyar doesn't work like most artists. He takes the world's most sophisticated photographic equipment, then hacks it with software he writes himself — all in order to twist our perception of time inside out. In this latest story from the digital publisher MATTER, Joshua Hammer discovers how Magyar's unique combination of technology and art challenges the way we understand the world. At one point, Magyar realized he needed a 'slit-scan' camera, 'the type used to determine photo finishes at racetracks and at Olympic sporting events by capturing a time sequence in one image. Such cameras were rare and cost many thousands of dollars, so Magyar set out to build one himself. He joined a medium-format camera lens to another sensor and wrote his own software for the new device. Total cost: $50. He inverted the traditional scanning method, where the sensor moves across a stationary object. This time, the sensor would remain still while the scanned objects were in motion, being photographed one consecutive pixel-wide strip at a time. (This is the basic principle of the photo-finish camera.) Magyar mounted the device on a tripod in a busy Shanghai neighborhood and scanned pedestrians as they passed in front of the sensor. He then digitally combined over 100,000 sequential strips into high-resolution photographs.' There are pictures and videos interspersed throughout the article."

0
Your rating: None
Original author: 
Regine

180k

While emphasizing the multiple correspondences between collectives and groups like Arte Povera, Archizoom, Superstudio, and figures such as Ettore Sottsass and Alessandro Mendini, The Italian Avant-Garde: 1968-1976 also highlights previously overlooked spaces, works, and performances generated by Zoo, Gruppo 9999, and Cavart. Newly commissioned interviews and essays by historians and curators shed light on the era, while contemporary practitioners discuss its complex legacy continue

0
Your rating: None
Original author: 
John Timmer

FirasMT

In the past few years, there have been a regular series of announcements about devices that cloak something in space. These typically bend light around the cloak so that it comes out behind the object looking as if it had never shifted at all. In contrast, there's just been a single description of a temporal cloaking device, something that hides an event in time. The device works because in some media different frequencies of light move at different speeds. With the right combination of frequency shifts, it's possible to create and then re-seal a break in a light beam.

But that particular cloak could only create breaks in the light beam that lasted picoseconds. Basically, you couldn't hide all that much using it. Now, researchers have taken the same general approach and used it to hide signals in a beam of light sent through an optical fiber. When the cloak is in operation, the signals largely disappear. In this case the cloak can hide nearly half of the total bandwidth of the light, resulting in a hidden transmission rate of 12.7 Gigabits per second.

The work started with the Talbot effect in mind, in which a diffraction grating causes repeated images of the grating to appear at set distances away from it. The cloaking device relies on the converse of this. At other distances, the light intensity drops to zero. The key trick is to convert the Talbot effect from something that happens in space to something that happens in time.

Read 6 remaining paragraphs | Comments

0
Your rating: None
Original author: 
(author unknown)

Great design is a product of care and attention applied to areas that matter, resulting in a useful, understandable, and hopefully beautiful user interface. But don’t be fooled into thinking that design is left only for designers.

There is a lot of design in code, and I don’t mean code that builds the user interface—I mean the design of code.

Well-designed code is much easier to maintain, optimize, and extend, making for more efficient developers. That means more focus and energy can be spent on building great things, which makes everyone happy—users, developers, and stakeholders.

There are three high-level, language-agnostic aspects to code design that are particularly important.

  1. System architecture—The basic layout of the codebase. Rules that govern how various components, such as models, views, and controllers, interact with each other.
  2. Maintainability—How well can the code be improved and extended?
  3. Reusability—How reusable are the application’s components? How easily can each implementation of a component be customized?

In looser languages, specifically JavaScript, it takes a bit of discipline to write well-designed code. The JavaScript environment is so forgiving that it’s easy to throw bits and pieces everywhere and still have things work. Establishing system architecture early (and sticking to it!) provides constraints to your codebase, ensuring consistency throughout.

One approach I’m fond of consists of a tried-and-true software design pattern, the module pattern, whose extensible structure lends itself to a solid system architecture and a maintainable codebase. I like building modules within a jQuery plugin, which makes for beautiful reusability, provides robust options, and exposes a well-crafted API.

Below, I’ll walk through how to craft your code into well-organized components that can be reused in projects to come.

The module pattern

There are a lot of design patterns out there, and equally as many resources on them. Addy Osmani wrote an amazing (free!) book on design patterns in JavaScript, which I highly recommend to developers of all levels.

The module pattern is a simple structural foundation that can help keep your code clean and organized. A “module” is just a standard object literal containing methods and properties, and that simplicity is the best thing about this pattern: even someone unfamiliar with traditional software design patterns would be able to look at the code and instantly understand how it works.

In applications that use this pattern, each component gets its own distinct module. For example, to build autocomplete functionality, you’d create a module for the textfield and a module for the results list. These two modules would work together, but the textfield code wouldn’t touch the results list code, and vice versa.

That decoupling of components is why the module pattern is great for building solid system architecture. Relationships within the application are well-defined; anything related to the textfield is managed by the textfield module, not strewn throughout the codebase—resulting in clear code.

Another benefit of module-based organization is that it is inherently maintainable. Modules can be improved and optimized independently without affecting any other part of the application.

I used the module pattern for the basic structure of jPanelMenu, the jQuery plugin I built for off-canvas menu systems. I’ll use that as an example to illustrate the process of building a module.

Building a module

To begin, I define three methods and a property that are used to manage the interactions of the menu system.

var jpm = {
    animated: true,
    openMenu: function( ) {
        …
        this.setMenuStyle( );
    },
    closeMenu: function( ) {
        …
        this.setMenuStyle( );
    },
    setMenuStyle: function( ) { … }
};

The idea is to break down code into the smallest, most reusable bits possible. I could have written just one toggleMenu( ) method, but creating distinct openMenu( ) and closeMenu( ) methods provides more control and reusability within the module.

Notice that calls to module methods and properties from within the module itself (such as the calls to setMenuStyle( )) are prefixed with the this keyword—that’s how modules access their own members.

That’s the basic structure of a module. You can continue to add methods and properties as needed, but it doesn’t get any more complex than that. After the structural foundations are in place, the reusability layer—options and an exposed API—can be built on top.

jQuery plugins

The third aspect of well-designed code is probably the most crucial: reusability. This section comes with a caveat. While there are obviously ways to build and implement reusable components in raw JavaScript (we’re about 90 percent of the way there with our module above), I prefer to build jQuery plugins for more complex things, for a few reasons.

Most importantly, it’s a form of unobtrusive communication. If you used jQuery to build a component, you should make that obvious to those implementing it. Building the component as a jQuery plugin is a great way to say that jQuery is required.

In addition, the implementation code will be consistent with the rest of the jQuery-based project code. That’s good for aesthetic reasons, but it also means (to an extent) that developers can predict how to interact with the plugin without too much research. Just one more way to build a better developer interface.

Before you begin building a jQuery plugin, ensure that the plugin does not conflict with other JavaScript libraries using the $ notation. That’s a lot simpler than it sounds—just wrap your plugin code like so:

(function($) {
    // jQuery plugin code here
})(jQuery);

Next, we set up our plugin and drop our previously built module code inside. A plugin is just a method defined on the jQuery ($) object.

(function($) {
    $.jPanelMenu = function( ) {
        var jpm = {
            animated: true,
            openMenu: function( ) {
                …
                this.setMenuStyle( );
            },
            closeMenu: function( ) {
                …
                this.setMenuStyle( );
            },
            setMenuStyle: function( ) { … }
        };
    };
})(jQuery);

All it takes to use the plugin is a call to the function you just created.

var jpm = $.jPanelMenu( );

Options

Options are essential to any truly reusable plugin because they allow for customizations to each implementation. Every project brings with it a slew of design styles, interaction types, and content structures. Customizable options help ensure that you can adapt the plugin to fit within those project constraints.

It’s best practice to provide good default values for your options. The easiest way to do that is to use jQuery’s $.extend( ) method, which accepts (at least) two arguments.

As the first argument of $.extend( ), define an object with all available options and their default values. As the second argument, pass through the passed-in options. This will merge the two objects, overriding the defaults with any passed-in options.

(function($) {
    $.jPanelMenu = function(options) {
        var jpm = {
            options: $.extend({
                'animated': true,
                'duration': 500,
                'direction': 'left'
            }, options),
            openMenu: function( ) {
                …
                this.setMenuStyle( );
            },
            closeMenu: function( ) {
                …
                this.setMenuStyle( );
            },
            setMenuStyle: function( ) { … }
        };
    };
})(jQuery);

Beyond providing good defaults, options become almost self-documenting—someone can look at the code and see all of the available options immediately.

Expose as many options as is feasible. The customization will help in future implementations, and flexibility never hurts.

API

Options are terrific ways to customize how a plugin works. An API, on the other hand, enables extensions to the plugin’s functionality by exposing methods and properties for the implementation code to take advantage of.

While it’s great to expose as much as possible through an API, the outside world shouldn’t have access to all internal methods and properties. Ideally, you should expose only the elements that will be used.

In our example, the exposed API should include calls to open and close the menu, but nothing else. The internal setMenuStyle( ) method runs when the menu opens and closes, but the public doesn’t need access to it.

To expose an API, return an object with any desired methods and properties at the end of the plugin code. You can even map returned methods and properties to those within the module code—this is where the beautiful organization of the module pattern really shines.

(function($) {
    $.jPanelMenu = function(options) {
        var jpm = {
            options: $.extend({
                'animated': true,
                'duration': 500,
                'direction': 'left'
            }, options),
            openMenu: function( ) {
                …
                this.setMenuStyle( );
            },
            closeMenu: function( ) {
                …
                this.setMenuStyle( );
            },
            setMenuStyle: function( ) { … }
        };

        return {
            open: jpm.openMenu,
            close: jpm.closeMenu,
            someComplexMethod: function( ) { … }
        };
    };
})(jQuery);

API methods and properties will be available through the object returned from the plugin initialization.

var jpm = $.jPanelMenu({
    duration: 1000,
    …
});
jpm.open( );

Polishing developer interfaces

With just a few simple constructs and guidelines, we’ve built ourselves a reusable, extensible plugin that will help make our lives easier. Like any part of what we do, experiment with this structure to see if it works for you, your team, and your workflow.

Whenever I find myself building something with a potential for reuse, I break it out into a module-based jQuery plugin. The best part about this approach is that it forces you to use—and test—the code you write. By using something as you build it, you’ll quickly identify strengths, discover shortcomings, and plan changes.

This process leads to battle-tested code ready for open-source contributions, or to be sold and distributed. I’ve released my (mostly) polished plugins as open-source projects on GitHub.

Even if you aren’t building something to be released in the wild, it’s still important to think about the design of your code. Your future self will thank you.

0
Your rating: None