Happy New Year!

2014 is quickly drawing to a close and aGupieWare's exclusive New Year's Eve Noise Maker app is available from the App Store for just $0.99.  The app plays numerous New Year's Eve sounds and songs. Irritate ears with the sound of a horn. Twist brains with the twirler sound. Perform an ensemble of the instruments above, or play the classic New Year's song "Auld Lang Syne." Bring the noise!

Mars (Salad) Bars: Fresh Greens On The Red Planet


Mars has been an attractive interplanetary target since the dawn of spaceflight, but now that the travel technology is nearly ready, how are we going to fully attend to the human elements of colonization?  Researchers in England have made one small step (well, bite) for mankind by planning to launch a crop of self-initiating lettuce to Mars.

Learn more at #LettuceOnMars.
(Image courtesy bis-space.com.)

The tasty terraforming is planned to work like this:  during the slated Mars One robotic mission in 2018, a self-sustaining greenhouse will be launched from Earth (as part of an array of other science experiments.)  The garden will "hibernate" during the long travel to Mars, with lettuce seeds safely frozen and equipment powered down.

Upon arrival on Mars, the lander will provide a small amount of energy to help power and aid the heating elements of the garden, keeping the temperature between 21C and 24C.  The lettuce seeds will be fed with carbon dioxide extracted from the Martian atmosphere (which is rich with the gas), and given other nutrients via aeroponic sprayers.  This eliminates the need for the plants to be grown in conventional soil, and if successful, could prove to be viable for a host of other food flora to be grown on the red planet.

Image is not scientifically accurate, but you get the idea.
(Image courtesy cdn.studentmoneysaver.co.uk.)

Photographs sent back of the space salad will inform the scientists of success.  As any prospective human colonists on Mars as currently considered to be making a one-way trip, the need for a constant on-planet food supply will be of critical importance.

Project leader Suzanna Lucarotti, from the University of Southhampton, explained the many diverse elements of the idea, telling the Metro, "We have tackled diverse sets of engineering challenges, including aeroponic systems, bio filters, low-power gas pressurisation systems and fail-safe planetary protection systems and then integrated them all into one payload on a tight mass, power and cost budget."

It might not be filet mignon, but it's a good first step in sustaining our next generation of astro-adventurers.

After a while, anything is better than the usual space paste.  Here, two astronauts "enjoy" tubes of beet soup...wrapped in vodka labels.  Maybe if an experiment can grow potatoes, some distilling can take place...
(Image courtesy wikimedia.org.)

New Year's Eve: Apps to Ring in the New Year

People all over the world are putting the final touches on their plans for tomorrow evening, to celebrate the end of the old year and the beginning of the next. Others, of course, are scrambling to get a plan together, and still others don't really give a damn about making plans at all. Whatever your plans might be, we've put together a list of a few apps that can help ring in the New Year:

The Times Square Ball App is the official app for the Times Square New Year's Eve celebrations in New York City. It has a countdown times, a live webcast from Times Square, Twitter integration and various info on the night's festivities.

California has put out a noteworthy app this year called DDVIP (Designated Driver VIP) that provides users with maps and guides to restaurants, bars and other venues that have special deals for all the designated drivers out there. (The designated drinkers already have more than their fair share of apps!)

London's Official City Guide app (on iTunes and Google Play) has tons of info on New Year's Eve celebrations in the city, including the New Year's Eve fireworks display and the New Year's Day parade.

The Sydney New Year's Eve app appears to be growing in popularity, along with the Australian metropolis's massive fireworks display, which is among the first seen around the world every year. The app contains tips and hints for getting the best view of the works, and provides video streams and other content as well.

The Berlin Philharmonic plays a special New Year's Eve concert every year, which they stream live on their website and on their dedicated app.

Finally, also check out aGupieWare's own New Year's Eve Noise Maker app, which is available from the App Store for just $0.99.  The app plays numerous New Year's Eve sounds and songs. Irritate ears with the sound of a horn. Twist brains with the twirler sound. Perform an ensemble of the instruments above, or play the classic New Year's song "Auld Lang Syne." Bring the noise!

The Question Of Invisibility: Google's Yearly Content Removal Request Report

The thing about dealing with information supergiants is that they not only have power over who sees your secrets and how, but they'll also discuss them when comprehensively covering what dirtier deeds than your own were begged to be scrubbed from the internet.

Such is the nature of Google's semiannual transparency report, another installation of which was released today.  For the first time, this report included some 30 examples of material that had been expressly asked (mostly by government operatives) to vanish from the common knowledge, as though what was reported on was really actually bad enough to transcend the public's millisecond-length attention span.

There's a lot of skullduggery out there...removing the evidence is kind of a big job.
(Image courtesy betanews.com.)

According to newsweek.com, some of it really WAS bad enough that it could ruin lives simply by remaining in the public eye.  Prison inmate abuse, serious sexual accusations, and purported "defamation" of numerous police officers were all included in the materials requested for removal.  None of these requests were granted.

By Google's anaylsis, nearly 8,000 requests were made for information removal during 2013.  These covered the e-extraordinary rendition of some 14,367 pieces of information.  Requests were up 60% from 2012 to have one's secrets permanently kept that way (at least from the eyes of the internet.)  The full transparency report including cases and actions taken is available for analysis.

The specific offending material varied, with governments making 1,066 requests for content be removed from blogs, 841 requests for removal from Google searches, and 765 requests to never again grace the screens of YouTube. These requests comprised the time period between July and December 2013 alone.

Unsurprisingly, people said and did a bunch of dumb stuff caught on Twitter too.
(Image courtesy transparency.twitter.com.)


The most cited reason for the prospective purge was explained as "defamation" (36%), with nudity/obscenity (16%) and security (11%) also making excuses. Google was quick to admit that their report is not a full account of possible online censorship, but is a good metric in that "it does provide a lens on the things that governments and courts ask us to remove, underscoring the importance of transparency around the processes governing such requests.”

You can run, and you can rant, and sling all the press and televised mess you want, but you can't hide from the internet. Little Brother has just as many cameras and ears as Big Brother. The "embarrassing" (and maybe appropriately defamatory) results are more than elements of evidence: they are mirrors to our very society. A stark and honest appraisal of that image requires the full picture of our actions, no matter how ugly.

So that's how that works!  Thanks, transparency!
(Image courtesy watchdog.org.)

Auto Layout and UIScrollView: A “Pure Auto Layout Approach” iOS Tutorial in Swift

With the advent of Auto Layout to iOS, more and more of the applications that we write will incorporate this new technology. If you are not using Auto Layout, then you are most likely writing error prone code that does a lot of mathematics that adjust your views for various situations. Auto layout is math but without all the complexities of doing mathematics. It simplifies the mathmatical process by abstracting out the most arduous part of computing view geometries—namely, view geometry dependencies. Solving simultaneous equations is a thing of the past with Auto Layout. We now “simply” specify the relational attributes between view geometric properties and let Auto Layout do the rest! However, as we all know, the introduction of a new framework brings a new set of hurdles to the table. One of the major hurdles that we have encountered is learning how to speak Auto Layout. We need to be very precise when using this new API. Our most recent difficult encounter was learning how to apply Auto Layout to a UIScrollView so that it behaves in a predictable way.

Introduction
In this tutorial, using a “pure Auto Layout approach,” we will programmatically create a UIScrollView with three subviews of UIView's. (See video below)


These three subviews, colored blue, yellow and green, will comprise the scrollable content area of our scroll view. The size and position of our scroll view will be animated into place by modifying its Auto Layout constraint values. The size of our scroll view (the view port) will be defined as a ratio of the width and height of the device's screen. The width of the scrollable area will be defined as one and a half times that of the scroll view's width. Our scroll view along with its subviews will dynamically resize to support both landscape and portrait view orientations, however, the ratio of the scrollable area to that of the scroll view's width will not change. If you are not familiar or in need of a refresher of these two technologies follow these links: UIScrollView, Auto Layout.

Setting Up
Download and boot-up the latest version of Xcode. From the Welcome screen, press (command+shift+1) if it's not visible, select the “Create a new Xcode project” from the option menu.

Welcome Screen

On the next menu, select "Single View Application" and click on the button labeled "Next."

Select Type of Application

For the following menu fill out all the fields as shown. For the "Organization Name" field you may type in the name of your organization instead.

Project Options

On the final menu for this setup you are prompted to select a location where this project will live. You are also given the option to place this project under source control using git. If you know how to use git then by all means use it! Otherwise uncheck the selection box where it reads "Source Control."

Code Structure
From the "Navigator" window, typically positioned to the left of Xcode, select the "Project Navigator" icon located in the top left corner.

Navigator

(If you can't see the navigator window as shown in the figure above then you may need to unhide it. To do this, in the top right corner of Xcode you will find a button with three segments, select the left most segment to show or hide the "Navigator" window). Double click on the yellow folder labeled Auto Layout and Scroll View to reveal its contents. Select the file named ViewController.swift. In the text editor you will find the boilerplate source code that defines the subclass of this view controller. Replace all the code for the class definition with the following:

The code above is the entire skeletal code of our project. Code lines 4 and 5 define the height and width of our scroll view as a ratio of its the root view. The root view is the top most parent view in our view hierarchy; it fills the entire devices screen.

View Hierarchy
From the code snippet above, code lines 8 through 12 are the view objects that will comprise our project's complete view hierarchy. The asvContainerView object is a subview, or child view, of the asvScrollView object. The asvLeftView, asvMiddleView and asvRightView are sibling objects and subviews of asvContainerView. The sibling views are the objects that make up the visible contents of the scroll view.

Figure 5. View Hierarchy

Figure 5 is a visual representation of the described view hierarchy. The brown colored view is the asvScrollView object; the parent object of the views that sit in front of it. The cyan colored view is the asvContainerView object. The blue, yellow and green are the asvLeftView, asvMiddleView and asvRightView, respectively.

Meat and Potatoes
(Optioanal) The first function, asvInstallBlogName, that we define sets up a label for our blog's name. In this function, find the comment "// code placeholder tag //" and replace it with the following lines of code:



For the function asvApplyCenteringConstraints locate the comment "// code placeholder tag //" and replace it with the code below:

This function simply centers our scroll view, asvScrollView, object relative to it's root parent view.


Locate the function asvApplyHeightAndWidthConstraints and replace the comment "// code placeholder tag //" with the following lines of code:

In this function we simply install the height and width constraints on our scroll view, asvScrollView, object. As mentioned earlier, the height and width of this scroll view is a fixed ratio to that of its parent root view—the devices visible screen area.


Inside the function asvInstallScrollViewContainerWithConstraints locate the comment "// code placeholder tag //" and replace with the following code:

This function adds a scroll view container, our asvContainerView, as a subview of the root view along with Auto layout constraints so that it resizes proportionately to the various root view sizes.


For the function asvInstallScrollViewWithoutConstraints replace the comment "// code placeholder tag //" with the following lines of code:

In this function we install asvScrollView object as a subview of the root view, without constraints. We delay the installation of the constraints so that we can animate their installation into place later on in this tutorial.


Inside the function viewDidAppear replace the comment "// code placeholder tag //" with the following lines of code:

The first four lines of code sets up our view hierarchy by calling methods that we have stubbed out; we will later define these methods. The last two lines of code call our, stubbed out, custom methods that setup the height, width and centering constraints of our asvScrollView object.


Replace the comment "// code placeholder tag //" inside the function asvInstallSubviewsInsideTheScrollViewContainerWithConstraints with the following lines of code:

The above code installs subviews on our asvContainerView object. As mentioned earlier, these subviews comprise the visible content of our scroll view. We also setup Auto Layout constraints so that these subviews resize proportionately to their container view; a desired behavior when supporting various device screen sizes and device orientations—landscape and portrait modes. We also setup differing colors on these subviews to be able to readily discern between them.

Liftoff
Compile and run the application in any of the iPhone simulators. Once your application is running you should see on your simulators screen something similar to the image depicted in figure 6, while your simulator is in portrait mode.

Figure 6

After rotating you simulator to landscape mode you should see something similar to figure 7. Try to scroll the colored images from left to right.
Figure 7


Brief Animation
For our finishing touches we add a little bit of animation. Locate the following lines of code inside the viewDidAppear function,

and replace it with the following code:

This project can be found on GitHub.

We hope you enjoyed this tutorial. As always, comments, questions, suggestions and critique are welcome below.

Space Station Sunday: Dragon Delayed; CATS Not Prowling Yet

Good evening, space fans!  Here's what's recently been happening on our favorite orbital outpost.

A SpaceX Dragon launch that was supposed to ferry new equipment and supplies to the ISS has been delayed until after January 6th.  The Dragon, an unmanned spacecraft, will include cargo such as a flatworm experiment, external radiation monitors, and a wearable technology experiment that tracks astronauts' bio-statistics as they sleep.  It will later also ferry completed experiments back to earth.  In the meantime, the ISS crew have been making room for their new gear, readying the completed experiments for earthly analysis.

Perhaps the most notable experiment that will be arriving aboard on the SpaceX Dragon is the CATS, or Cloud-Aerosol Transport System, which uses light detection and ranging (LIDAR) to assess particulate matter in the atmosphere.  This will shed light not only on how our atmosphere and climate deals with varying levels of pollutants and natural elements, but will also aid in assessing the safest possible conditions for future space launches.

We know what you're thinking and no, it is not like this at all.
(Image courtesy valarie/imgur.com.)

Another delivery spacecraft, Europe's unmanned Automated Transfer Vehicle, was packed with garbage from the ISS.  The ATV will be released from the space station in February, when it will incinerate both the garbage and itself in "fiery destruction" over the Pacific.

Though science and maintenance continued despite the lack of the Dragon, downtime was also provided for the astronauts to have some room for seasonal celebration.

ESA astronaut Samantha Cristoforetti doesn't need any reindeer to fly.
(Image courtesy NASA.gov.)


However, the holidays don't take precedence over the glory of science, and work continued on a variety of objectives.  One of the notable experiments the astronauts worked on this week included extensive analysis by scientists on the ground.  The Neuromapping study, according to NASA, will help "to assess changes in a crew member’s perception, motor control, memory and attention during a six-month space mission." Previous astronauts' reports have alluded to a possible loss of movement control and cognitive ability taking place in microgravity. Using fMRI and MRI machines, the study seeks to further discern how and why these changes may occur.

Another experiment, Skin-B, involved analyzing possible reasons why human skin ages more rapidly in space than on earth.  Yes (surprise!), the environment of space is not particularly pleasant to human beings across the board, even when one is ensconced in sweet space station surroundings.

No one is going to understand this hard-won homefront more completely than astronaut Scott Kelly, who plans to spend a full year on the ISS beginning in spring 2015.  Along with veteran Russian cosmonaut Mikhail Kornienko, the two will spend a year on the ISS, assessing everything from prolonged ocular exposure in microgravity to psychological health issues from living in space.  

NASA astronaut Scott Kelly, pictured in the ISS cupola on October 14, 2010, proved adept from all angles while serving as the Flight Engineer for Expedition 25.
(Image courtesy NASA.gov.)


Particularly of interest are any unforeseen problems that could pose threats to longer-duration missions, such as an expedition to Mars.  John Charles, chief of NASA's Human Research Program’s new International Science Office, noted, “This one-year mission opportunity will show if the trends continue as before or if we are approaching any ‘cliffs’ that will require new treatments while providing new insights.”

And finally, as earth celebrates another orbit around the sun, we can celebrate the continued success of the brave men and women orbiting our earth.  The video below is a composite of 12,500 images captured by German astronaut Alexander Gerst, who recently returned home to earth.  Cheers to our fearless astro-adventurers...it's looking like 2015 will hold more flying fascination than ever!






Amazon Holiday App Giveaway

Amazon is running an app giveaway for Christmas this year, with a free app bundle worth over $200. The bundle includes games, productivity tools, utilities, media applications, and more. One noteworthy app for all the Arduino and Raspberry Pi tinkerers out there is the ElectroDroid Pro which boasts a large collection of electronics-related tools and references.

And, with New Year's Eve coming up, also check out aGupieWare's own New Year's Eve Noise Maker app, which is available from the App Store for just $0.99.  The app plays numerous New Year's Eve sounds and songs. Irritate ears with the sound of a horn. Twist brains with the twirler sound. Perform an ensemble of the instruments above, or play the classic New Year's song "Auld Lang Syne." Bring the noise!