Strider i helig stad i Irak SvD Utrikes(cached at July 2, 2014, 11:33 pm)

Omkring 45 människor har dödats i sammandrabbningar i den heliga staden Karbala. Och samtidigt som Isis uppmanar muslimer i hela världen att ansluta sig till dem, erbjuder Iraks premiärminister Nuri al-Maliki amnesti åt irakier som tidigare bekämpat staten.
Strider i helig stad i Irak SvD Utrikes(cached at July 2, 2014, 11:33 pm)

Omkring 45 människor har dödats i sammandrabbningar i den heliga staden Karbala. Och samtidigt som Isis uppmanar muslimer i hela världen att ansluta sig till dem, erbjuder Iraks premiärminister Nuri al-Maliki amnesti åt irakier som tidigare bekämpat staten.
Chinese Company '3D-Prints 10 Buildings In One Day Slashdotby Soulskill on china at January 1, 1970, 1:00 am (cached at July 2, 2014, 11:33 pm)

Lucas123 writes: A company in China has used additive manufacturing to print 10 single-room buildings out of recycled construction materials in under a day as offices for a Shanghai industrial park. The cost: about $5,000 each. The company, Suzhou-based Yingchuang New Materials, used four massive 3D printers supplied by the WinSun Decoration Design Engineering Co. Each printer is 20 feet tall, 33 feet wide and 132 feet long. Like their desktop counterparts, the construction-grade 3D printers use fused deposition modeling (FDM), where instead of thermoplastics layer after layer of cement is deposited atop one another. The cement contains hardeners that make each layer firm enough for the next. Yingchuang's technique builds structures off site in a factory one wall at a time. The structures are then assembled onsite. The technique is unlike U.S.-based Contour Crafting, a company whose 3D printing technology to form the entire outer structure of buildings at once, The Yingchuang factory and research center, a 33,000 square foot building, was also constructed using the 3D printing manufacturing technique. It only took one month to construct.

Read more of this story at Slashdot.








VIDEO: US drought 'worst for decades' BBC News | Science/Nature | UK Edition(cached at July 2, 2014, 11:30 pm)

Parts of the United States are experiencing the worst drought for decades with farmers warning that harvests are being badly hit.
VIDEO: US drought 'worst for decades' BBC News | Science/Nature | UK Edition(cached at July 2, 2014, 11:30 pm)

Parts of the United States are experiencing the worst drought for decades with farmers warning that harvests are being badly hit.
CVE-2014-4564 (Natl. Vulnerability Database) SANS ISC SecNewsFeed(cached at July 2, 2014, 11:30 pm)

Tårgas mot demonstranter i Brasilien SvD Utrikes(cached at July 2, 2014, 11:03 pm)

Polisen i Sao Paulo i Brasilien sköt gummikulor och tårgas mot omkring 300 demonstranter på tisdag kväll. Kravallpolis omringande ett torg i staden där en grupp akademiker och advokater hade samlats för att debattera det - enligt dem - obefogade gripandet av två demonstranter den 23 juni.
Män stoppades - körde på polisbil SvD Inrikes(cached at July 2, 2014, 11:03 pm)

En bil med flera män i körde på en polisbil och knivhotade polispatrullen när de stoppades för en kontroll på onsdagen.
Män stoppades - körde på polisbil SvD Inrikes(cached at July 2, 2014, 11:03 pm)

En bil med flera män i körde på en polisbil och knivhotade polispatrullen när de stoppades för en kontroll på onsdagen.
Vesper Sync Diary #19 - Intermediate Objects inessential.comat January 1, 1970, 8:00 am (cached at July 2, 2014, 11:01 pm)

In the shipping version of Vesper, VSNote, VSTag, and VSAttachment objects can convert to JSON directly. When sending objects to the server, it fetches from the database, then gets the JSON representation of each object (as a dictionary) and sends those (as JSON data).

That’s pretty reasonable, I think.

The thing I like less about the shipping version is how it handles JSON responses from the server. It calls merge routines which compare JSON dictionaries to existing objects. When an object is new it creates a new model object based on the dictionary.

I don’t like this because working with JSON dictionaries is a pain, and it was a source of bugs during development. There are three main issues:

So what happened is that the merge code is really doing two things: 1) converting JSON values to expected types and validating values, and 2) doing the actual merging.

The change I’m making right now is to make these two steps more explicit. It comes at a small cost, but not something a user would ever perceive, so it’s fine. (I’m a mad stickler for performance, and Vesper is praised for being fast — it will remain fast.)

I’m introducing three new classes — VSSyncNote, VSSyncTag, and VSSyncAttachment — which all inherit (ugh) from VSSyncObject.

These classes do the following:

These classes watch for NSNull values and turn those to nils. They handle date conversions.

On Sending to the Server

Instead of doing a fetch request and turning model objects directly to JSON objects, the conversion will go model object -> VSSyncObject -> JSON. Yes, that’s extra work, but not noticeably extra, and it centralizes all the conversion knowledge in the sync object.

On Handing Responses from the Server

The conversion will go from JSON -> VSSyncObject. Then the merge routines will compare model objects to VSSyncObjects, rather than to JSON.

This means that the merge routines will not have to worry about NSNull and dates-as-strings — all that work will have been done before the merge happens, in the various sync objects.

What I Like About All This

It makes for more testable code. For instance, I can test JSON validation and type conversions without having to run the merge code.

Another thing I like: conversion to/from JSON can happen on a background queue. Right now this is all on the main thread, since the actual model objects, which are main-thread-only, are involved. (So, in the end, it may be that this change makes Vesper feel even faster, since more work is shuffled to the background.)

But the main thing is cleaner code. The merge routines work and I know they work — they have tests, yes — but every time I look at them it’s hard to see the logic past all the JSON-handling and the objectForKey: calls. This way the logic will be made perfectly clear — and, since this is a super-critical part of the app, it should read like a smart kindergardener wrote it. (Which is exactly how I want all my code to look, come to think of it.)

Afghan soldiers die in Kabul suicide bombing AL JAZEERA ENGLISH (AJE)(cached at July 2, 2014, 11:00 pm)

Taliban claims responsibility for attack on bus in Afghan capital that left 11 people dead and 13 others wounded.
Afghan soldiers die in Kabul suicide bombing AL JAZEERA ENGLISH (AJE)(cached at July 2, 2014, 11:00 pm)

Taliban claims responsibility for attack on bus in Afghan capital that left 11 people dead and 13 others wounded.
CVE-2014-4516 (Natl. Vulnerability Database) SANS ISC SecNewsFeed(cached at July 2, 2014, 11:00 pm)

CVE-2014-4516 (Natl. Vulnerability Database) SANS ISC SecNewsFeed(cached at July 2, 2014, 11:00 pm)

Hundratusentals flyr till Etiopien SvD Utrikes(cached at July 2, 2014, 10:33 pm)

Över 158 000 sydsudaneser har flytt till grannlandet Etiopien för att undkomma de inbördes stridigheter som har pågått sedan december 2013, visar nya siffror från FN:s livsmedelsprogram WFP.