Archive for the ‘Random’ Category

Enable debug and release builds in Visual Studio Express editions

I always forget how to do this:

  • Tools » Options » Show all settings (checkbox in lower-right)
  • Projects and Solutions » General » Show advanced build configurations (checkbox)

h/t: Ramon Smits

The Hakka Tulou

I came across this great photo essay a while back regarding a unique and impressive form of housing found in rural China, the Tulou, used by the Hakka people.

hakka house courtyard

The Tulou is typically a large enclosed building, rectangular or circular in configuration, with a very thick weight supporting earth wall (up to 6 feet thick) and wooden skeletons, between three and five stories high, housing up to 80 families. These earth buildings usually have only one main gate, guarded by 4 to 5 inch thick wooden doors reinforced with an outer shell of iron plate. The top level of these earth buildings has gun holes for defense against bandits. They are a testament to the unique cultures that exist throughout China.

Doom boxart artist dies

Don Ivan Punchatz, the artist who helped id Software launch Doom to a greatness by designing the artwork on the box and promotional materials, has died of cardiac arrest.

Don’s work was best known to gamers for his efforts on the Doom packaging – the iconic image of the space marine shooting down into the hellish hordes – but that was only a small part of his work. His styles varied hugely between photo-realism and surrealism and he was affectionately known as ‘The Godfather of Dallas Illustration’ for his work in founding Sketch Pad Studios, which helped launch other artists to greatness.

doom boxart

h/t bit-tech.net

Leaky research

If your going to speculate (wildly) regarding technical details about the Apple tablet in relation to the iPhone, at least try to get the fundamental details in question correct. Case-in-point.

memory modules

For an Apple Tablet to be a hit, it will have to be more than a big-screen iPhone. And the difference between a lithe, touch-based Mac and a giant, lame iPhone comes down to one crucial nerd-factor: memory management.

When your program closes, your app is supposed to give back all that memory to the OS, so that it your computer can use it for other apps. If your program doesn’t give back memory to the system, it’s called a “leak.” Leaky programs are bad; they make things crash.

This sounded fishy, and it is – the iPhone OS, like most modern OSs, will reclaim memory when an program terminates. A program with a memory leak will not cause anything to crash, but running out of memory will force the OS to forcefully terminate apps (which is not the same as a crash).

It [Apple Newton] supported garbage collection, or automatic memory management, just like full-grown desktop Macs. What’s the difference to you? More powerful apps.

There is no correlation shown between garbage collection and more powerful applications. Many complex, powerful and high quality applications are written in languages that don’t support garbage collection; for example, Photoshop.

So iPhone apps tend to “leak memory,” or hang on to memory too long. Developers I’ve interviewed–even Apple Design Award winners–have mentioned to me that their iPhone apps are leaking memory almost constantly because they’re too lazy to be really anal about manual memory management.

Read: lazy developers designed apps with crappy architectures that couldn’t handle reliable deallocation of memory.

But this means iPhone apps can only get so complex before they require too much hand-tuning to be worth the time.

“worth the time” is entirely dependent on the developer and the purpose of the app. If a more powerful app is worth it to an individual or company, they’ll make the investment to build an app with a more robust architecture and better memory management.

Garbage collection is certainly a nice feature to have, but it’s not a silver bullet for developers.

First photos of the atom

Last month physicists at the Kharkov Institute for Physics and Technology photographed the electron cloud of a single carbon atom. The images are the first real photographs of the electrons of a single atom, showing the s and p orbitals of a carbon atom.

carbon atom

Quantum mechanics states that an electron doesn’t exist as a single point, but spreads around the nucleus in a cloud known as an orbital. The soft blue spheres and split clouds seen in the images show two arrangements of the electrons in their orbitals in a carbon atom. The structures verify illustrations seen in thousands of chemistry books because they match established quantum mechanical predictions.

… and as for how it was done…

To create these images, the researchers used a field-emission electron microscope, or FEEM. They placed a rigid chain of carbon atoms, just tens of atoms long, in a vacuum chamber and streamed 425 volts through the sample. The atom at the tip of the chain emitted electrons onto a surrounding phosphor screen, rendering an image of the electron cloud around the nucleus

The sharper a sample’s pointed tip inside the vacuum chamber, the greater the resolution of the final image on the screen said Igor Mikhailovskij, one of the paper’s authors. In the last year, physicists learned to manipulate carbon atoms into chains. With the tip of the sample now just a single atom wide, the microscope was able to resolve the electron’s orbitals.

Sietch Nevada

This is amazing. It’s the Sietch Nevada project from an exhibit (Out of Water | innovative technologies in arid climates) at the University of Toronto earlier this year.

View of the urban life among the water bank canals

Sietch Nevada projects waterbanking as the fundamental factor in future urban infrastructure in the American Southwest. Sietch Nevada is an urban prototype that makes the storage, use, and collection of water essential to the form and performance of urban life… A network of storage canals is covered with undulating residential and commercial structures. These canals connect the city with vast aquifers deep underground and provide transportation as well as agricultural irrigation. The caverns brim with dense, urban life: an underground Venice.

Magnetic levitation of large water droplets… and mice!

From PhysOrg.com article,

Scientists have managed to levitate young mice in research carried out for NASA. Levitated mice may help research on bone density loss during long exposures to low gravity, such as in space travel and missions to other planets.

How it works:

The scientists built a variable gravity simulator consisting of a superconducting magnet that could generate a magnetic field strong enough to levitate the water inside every cell in the mouse’s body. Water is weakly diamagnetic, which means that in the presence of a strong magnetic field the electrons in water rearrange orbit slightly, creating tiny currents in opposition to the external magnetic field. If the external magnet is strong enough, the diamagnetic repulsion of the water in the mouse tissue is enough to exactly balance the force of gravity on the body.

Eye candy is a critical business requirement

Interesting presentation:

eye candy is a critical business requirement

The problem with forensics

I stopped watching CSI a long time ago, but remember being annoyed by some stupid piece of dialog a long time ago where Grissom says “terminal velocity is 9.8 meters per second squared.” Turns out, lack of scientific knowledge is not that far off from real forensic “science” either.

csi

Forensic science was not developed by scientists. It was mostly created by cops, who were guided by little more than common sense. And as hundreds of criminal cases begin to unravel, many established forensic practices are coming under fire.

From CSI Myths: The Shaky Science Behind Forensics in Popular Mechanics.

Virtualbox

I recently looked into Virtualbox as a alternative to my current virtualization solution (MS Virtual PC). I was particularly convinced to give it a try after reading this article on ArsTechnia detailing some of the new features in version 3.

virtualbox with openSUSE

A quick rundown of the good and the bad (so far):

  • 64-bit guest within a 32-bit host. As a 32-bit version of Windows XP is my primary OS, I loved that I could virtualize the 64-bit version of Windows 7 and was able to get pretty decent performance. (fyi, I do have a 64-bit CPU with hardware virtualization support)
  • Unable to install openSUSE 11. I have no clue why; it booted from the CD image, but froze once I selected the menu option to start setup. However, I was able to successfully install openSUSE 11.1 without any issues.
  • Constant CPU usage. I notice some of my VM would constantly push their CPU/core to 100%. However, I think this is related to the following issue…
  • Networking problems. The default virtual ethernet adapter (PCnet) seems to cause certain VMs to freeze. I encountered this with openSUSE and Ubuntu. A solution can be found here; basically, just switch to the “Intel PRO/1000 T Server” adapter.
  • Problems installing guest additions on openSUSE. I wanted the guest additions primarily to be able to dynamically adjust the guest’s resolution, which is an increadibly powerful feature. Getting the guest additions installed is not quick and easy. Partial solutions can be found here and here. In short, first do an update to make sure you have the same kernel and kernel sources (needed for the guest additions). sudo zypper dist-upgrade Then add/update the following components: sudo zypper install gcc make automake autoconf kernel-source All of this can take a while. After all installs/updates are done, restart, then run the appropriate script off the cd image.
  • Dynamic resizing doesn’t work. If you got the guest additions installed following the steps above, you’ll find that dynamic resizing doesn’t work (however, your resolution will jump to 1024×768 from the default 800×600). There’s message after installation of the additions that alludes to this. You’ll have to edit xorg.conf (/etc/X11/xorg.conf). See here. In the Monitor section remove or comment out any “PreferredMode” options. In the Screen section remove or comment out any line with “Modes”. Restart, and dynamic resizing should now work. (Note, one minor quirk I noticed is that the openSUSE taskbar jumped from the bottom of the screen to the top when a resize was done. I’m not sure if this is an issue with Virtualbox or openSUSE.).

Overall, I’m both impressed and disappointed. Virtualbox has an impressive feature-set, but the “out-of-the-box” experience leaves a lot to be desired.