Browsed by
Category: Interesting or Cool

Dealing with Time Zones in Code

Dealing with Time Zones in Code

The real answer is to always use seconds since an epoch for logging – like the Unix epoch – with 64 bit integer representation (signed, if you want to allow stamps before the epoch). Any real-world time system has some non-linear, non-monotonic behaviour like leap hours or daylight savings.

Waaaay back in 2007

Waaaay back in 2007

I remember seeing this originally way back in the day – and I’m still a little baffled why this hasn’t caught on in the age of gigantic TV’s. Probably because head tracking isn’t exactly perfect just yet? While not as immersive as a full VR headset, this does provide a full vr experience without the headset, glasses, or any other intrusive headgear.

Johnny Chung Lee (at Carnegie Mellon at the time, now at Google) used the infrared camera in the Wii remote and a head mounted sensor bar (two IR LEDs), to accurately track the location of your head and render view dependent images on the screen. This effectively transforms your display into a portal to a virtual environment. The display properly reacts to head and body movement as if it were a real window creating a realistic illusion of depth and space. By Johnny Chung Lee, Carnegie Mellon University. For more information and software visit http://johnnylee.net

Price is Right Memories

Price is Right Memories

If you grew up in the last 30 years, you’re familiar with the Price Is Right. One of my many favorites as a kid was the game Cliff Hangers in which a little swiss climber would move his way up the mountain while yodeling music played.

It turns out, the name of the song is called “On the Franches Mountains” from the album “Swiss Mountain Music“. The magical clip used on air with the yodeling starts at 0:52 and 2:22.

One Froggy Evening

One Froggy Evening

In 1955, Looney Tunes writer Michael Maltese was inspired by the story of Ol’ Rip to write a cartoon episode titled One Froggy Evening. In the episode, a construction worker demolishing a building finds an 1897 time capsule inside a cornerstone. The capsule contains a living toad, Michigan J. Frog, which is able to sing Tin Pan Alley songs; in particular, “Hello! Ma Baby” and “I’m Just Wild About Harry”.

But did you know that it was based in fact?

On July 29, 1897, a 4-year-old boy named Will Wood caught a horny toad in Eastland County, Texas. The boy’s father, Eastland County clerk Ernest E. Wood, decided to use the reptile to test the West Texas tradition that the creatures could survive for many years in hibernation. The horned lizard was placed in a cornerstone of the Eastland County Courthouse in Eastland, Texas along with other time capsule memorabilia, including a Bible and a bottle of alcohol.

Thirty years later, construction workers began to tear down the old courthouse, and town officials scheduled a public event to open the time capsule in mid-February 1928. A crowd of 1,500 spectators gathered in Eastland, Texas, to witness the opening of the time capsule and to learn the fate of the horned toad. Newspaperman Boyce House recalled the chaotic scene:

“When the brick wall was pulled away from the cornerstone, the crowd rushed forward, in its excitement pressing so closely against a worker that he barely had room to ply his pick in order to break a layer of cement that was over the top of the stone. Then he lifted a sheet of metal underlying the cement. As this covering was raised, disclosing the cavity, Rev. F. E. Singleton (pastor of the Eastland Methodist Church), who was standing beside the cornerstone, leveled a finger and said: ‘There’s the frog!’ Eugene Day, oil man, thrust his hand into the cavity and lifted out a flat, dust-covered toad which he handed over to Rev. Mr. Singleton. The pastor handed the creature on to Judge Pritchard who dangled it aloft by a hind leg that all might see. Suddenly the other hind leg twitched: The frog was alive!”

Within days, national newspaper chains reported the discovery of the entombed lizard on their front pages. Due to the extensive media coverage, Ol’ Rip became a national celebrity.

The peak of Rip’s fame occurred in May 1928 when, during his national tour, the lizard was transported to Washington, D.C. where Texas Senator Earle Bradford Mayfield presented the specimen to President Calvin “Silent Cal” Coolidge. A bemused Coolidge purportedly declined to touch the frog and merely nudged it with his spectacles. A newspaper article reported the incident:

“President Coolidge asked numerous questions concerning his celebrated guest; stroked the frog’s back with his horn-rimmed glasses, and then President and Old Rip gazed steadily at each other for a full minute without a sound—Silent Cal had met his match”.

Old Rip now resides on display in the Eastland County courthouse.

Old Rip.

And you can see the cornerstone he spent 31 years in as well

Lickable TV

Lickable TV

Professor Homei Miyashita at Meiji University in Japan has developed a monitor that can imitate on-screen flavors, appropriately naming it Taste The TV (TTTV).

How does it work? It uses a carousel of ten different flavor canisters that can mix the basic flavor building blocks in different proportions to create a variety of tastes, This is sprayed on a hygienic film overlaying a flatscreen which then rolls down much like those old continuous/circular cloth towel dispensers.

Memory CAS latency and true speed

Memory CAS latency and true speed

How do you evaluate how fast a stick of ram is? Many people look at the raw frequency, others CAS latency, and others transfer rate.

As this article outlines, you need to consider both speed AND latency.

For speed (MT/s), this is fairly straightforward, higher is better. But that is only half the equation. The latency of access also matters. Latency is reported as the CAS time – but that is reporting only the total number of clock cycles before access. This can be misleading by itself, because it’s just a number of cycles – not how LONG that time is.

To get an apples-to-apples comparison on latency, we need to look at latency in terms of nanoseconds – not clock cycles. To calculate a module’s latency in nanoseconds, simple multiply clock cycle duration by the total number of clock cycles.

latency (ns) = clock cycle time (ns) x number of clock cycles

Otherwise, you may not be getting much of an improvement at all. Youtube testers often find little difference between different sticks of ram because they might be focusing on faster CAS latency but not doing the whole equation. The table below shows some examples and why you need to pay attention to both speed and CAS timing.

TechnologySpeed (MT/s)Clock Cycle Time(ns)CAS LatencyLatency (ns)
DDR418661.071313.93
DDR421330.941514.06
DDR424000.831714.17
DDR426660.751914.25
DDR429330.682114.32
DDR432000.622213.75
DDR548000.424016.67

So what is the recommendation?

  • Step 1: Identify the highest memory speed supported by both your processor and motherboard (including overclocking profiles).
  • Step 2: Select the lowest latency memory that fits within your budget at that speed, remembering that a superior (i.e. lower) latency means superior system performance.

Here’s some additional information about differences between DDR speeds.