Severance Pay - Video of a BMDS 24 Hours To Curtain Production
In 2009, Bermuda Musical and Dramatic Society presented 24 Hours to Curtain: six writers start at 8pm Friday night, are given an opening line, a closing line, and a prop. Their job is to write a 10 minute play, and have it finished by 8am Saturday morning, when the directors and actors come in to learn their lines, block the stage, rehearse, and are ready to put the production on at 8pm Saturday night. This is Severance Pay, one of the plays written over night and presented the next day. And I had just received a Panasonic HVX200A. This is one of my first attempts at video. The first couple of minutes scroll some dialog as I missed the opening.
Singer / Song Writer Steven Kerr was in Bermuda during January 2011 to
perform and record some songs with local musicians. I grabbed a camera
and we spent a day shooting video for his song Million Lights. Basically,
it is a travelogue of a few interesting spots in Bermuda.
C++ IDE's for Linux: Eclipse, Code::Blocks, KDevelop
For my C++ code on a Linux platform, I started out by using the Eclipse/CDT editing environment. It offers
things like:
multiple tiled windows for editing
has wizards for setting up projects for libraries and for applications
built in debugging environment
live macro expansion (very handy for dealing with multi level boost::preprocessor expansions)
basic forms of code completion
by jumping through hoops, one can get Subversion integration
Recently, the hoops I needed to jump through with Eclipse started creating pain. Subversion integration
started generating errors when I upgraded the Java Runtime Environment. I also noticed that build times
on projects were slower than I would like. This was measurable in seconds, nothing earth shattering, but
adds up over time.
I then started to look at Code::Blocks 10. It's beneftis were:
reasonably fast interface, but can only view one file at a time in a simple tabbed interface
good build times
easy project creation
It's biggest draw back is that it uses a tabbed interface with no ability, (at least for what I could find), to
have multiple panes looking at different files simultaneously. Big show stopper there.
I then installed KDevelop 4. This environment, from initial inspection, appears to be much better. Things looking good
appear to be:
fast interface with tiled windows for viewing multiple files
Subversion is fully integrated from the 'get-go'
build times are quick
The learning curve is sharper/longer, but, from first blush, looks to be worth it. The basic requirement is
to learn how CMake works, as that is an integral part of the build process. The CMakeLists.txt file is part of the
IDE environment with some of it created automatically, and the special bits managed manually by the programmer.
On the initial look and feel, I think KDevelop will become my primary C++ code editing environment. I'm
hoping code completion works well, and that KDevelop deals with template stuff just as well.
I wanted to record this little snippet for something to check back on during some point in the
future.
One writer is indicating that Germany is the real economic power in the European Union. Should the
European Union break apart or evolve/devolve into something else, Germany can't go it alone. I have to
take that assertion with a certain grain of salt, but perhaps the next idea fits in.
It is said that Germany's strength is it's manufacturing and export ability. Germany also has a
decreasing population. A logical partner might be France, but they are typically highly competitive
with each other, rather than cooperative with each other.
On the other hand, Russia has a large population with nothing much to do. Rather than being an
exporter of raw materials, Germany could partner with Russia for manufacturing. Rather than
increasing immigration towards Germany, which is something Germany does not want, they would
send manufacturing to Russia.
In summary, it would be of interest to see how the European Union reorganizes around a
possible Germany - Russion alliance.
Through the years of maturing in software development, I have migrated through a
series of technologies to solve various programming problems.
During the initial stages of my C++ usage, I used the tried and true run-time dynamic
polymorphism, mostly known as virtual methods through class inheritance. To answer the question of
when to use virtual destructors, Herb Sutter has an excellent article called
Virtuality.
For more virtual destructor information, Item 33 in Scott Meyer's More Effective C++ is helpful.
Inheritance - virtual Functions FAQ has more useful information.
Class inheritance and virtual functions closely couple classes. I wanted start some
decoupling, and do some event based coupling through C#-like events/delegates.
C++ doesn't have a similar concept built-in, but there are various libraries available
while supply a similar concept: Boost's slot/signal system, or the one I ended up using:
FastDelegates.
FastDelegates are supposed to be fast. And they do work well.
As I do some work on the Windows platform, I had been using the MFC classes for some GUI work.
As I got more into multi-threaded designs, MFC started to show it's significant short-comings
related to modular and mult-threaded designs. I came across the Windows Template Library (WTL)
as a nice, fast, light-weight windowing library.
The WTL introduced to me the concept of the Curiously Recurring Template Pattern (CRTP). WTL and
ATL make significant use of the CRTP pattern. A good introduction can be found at Wikipedia's entry for
Curiously Recurring Template Pattern.
CRTP has brought me back tight-coupling of classes, but as a consequence, it offers up the ability to
integrate a number of concepts together: slot/signals aka delegates, maintenance of strong typing,
simulated dynamic binding aka static polymorphism, and fast execution.
The close-at-hand references don't mention one other refinement (I wish I could find the
original source of this trick), and that is one of conditional static polymorphism. There is a way
to conditionally make the polymorphism call: if the derived class doesn't over-ride a method,
the calling code doesn't get compiled, it gets optimized away.
For example:
template <typename T>
class base {
void implementation( void ) {};
void interface( void ) {
if ( &base<T>::implementation != &T::implementation ) {
static_cast<T*>( this )->implementation();
}
}
};
class derived1: public base<derived> {
};
class derived2: public base<derived> {
void implementation( void ) {};
};
In this example of the CRTP, the base class has a default implementation of the interface.
In class derived1, as there is no implementation defined, no implementation gets called. In
class derived2, where there is an implementation defined, it is called.
Common Representation of IPv6 Address Text Representation
Most everyone knows how to write an IPv4 ip address, and is easy and simple to understand.
As the world migrates to a new internet addressing system, which is known as IPv6, writing
out the address becomes difficult. The difficulty is that there are multiple ways of
writing an IPv6 address. As a consequence, when people need to perform text searches,
no matches may result because the way in which it was searched doesn't match the way in
which it was written.
Leading zeros MUST be suppressed. For example 2001:0db8::0001 is not
acceptable and must be represented as 2001:db8::1. A single 16 bit
0000 field MUST be represented as 0.
The use of symbol "::" MUST be used to its maximum capability. For
example, 2001:db8::0:1 is not acceptable, because the symbol "::"
could have been used to produce a shorter representation 2001:db8::1.
The symbol "::" MUST NOT be used to shorten just one 16 bit 0 field.
For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but
2001:db8::1:1:1:1:1 is not correct.
When there is an alternative choice in the placement of a "::", the
longest run of consecutive 16 bit 0 fields MUST be shortened (i.e.
the sequence with three consecutive zero fields is shortened in 2001:
0:0:1:0:0:0:1). When the length of the consecutive 16 bit 0 fields
are equal (i.e. 2001:db8:0:0:1:0:0:1), the first sequence of zero
bits MUST be shortened. For example 2001:db8::1:0:0:1 is correct
representation.
The characters "a", "b", "c", "d", "e", "f" in an IPv6 address MUST
be represented in lower case.
When writing port numbers with an IPv6 address, the [] style as expressed in [RFC3986] SHOULD be employed, and is the
default unless otherwise specified -- [2001:db8::1]:80
Borrowing Money to make Money, Taxpayer Pays the Interest
Eric Fry, in teh Daily Reckoning, provides an interesting insight into the profitability of today's banking sector:
When it converted into a bank holding company back in 2008, Goldman became eligible to borrow
cheap money from the Fed's discount window. Morgan Stanley did the same thing. As a result, Goldman,
Morgan Stanley et al. may borrow billions of dollars from the Federal Reserve and use the
proceeds to purchase higher-yielding government securities of longer duration.
In other words, Goldman may borrow from the government at 0.75%, then loan the money back to the
government at 3% or 4%. All in a day's "trading." Not surprisingly, all the major financial
firms have been reporting blockbuster profits. Yesterday, for example, Morgan Stanley
wowed the Street by nearly doubling its expected earnings result. Bond trading provided most of t
he juice, as Morgan's fixed-income revenue more than doubled from the prior year's first quarter.
Prior to Morgan Stanley's results, Bank of America, JP Morgan Chase and, yes, Goldman Sachs, h
ad all reported record quarterly revenue from fixed-income trading. On the surface,
these monster profits would seem like good news. But this silver cloud contains a very dark
lining: without the Fed's low-cost financing, fixed-income profits will be much harder to come by.
Byron King at Whiskey and Gunpowder wrote about how natural relate to human events through
history. Any history buffs able to confirm the following?
We need to keep an eye on Iceland and its grumpy volcanoes. The historic record is
filled with Icelandic volcano blasts that wrecked European civilization. It goes back at
least to the days of the Roman Empire. There's evidence that an Icelandic eruption in A.D. 405
led to a harsh winter the next year, in which the Rhine River froze. This allowed the
barbarians cross in numbers sufficient to defeat the Roman Legions.
In A.D. 934, there was a massive lava flow from Iceland's Eldgja fissure system.
It unleashed the largest basalt flood in recorded history. An ash cloud blanketed
Northern Europe and weakened many political structures. This eruption helped keep
the Dark Ages dark, and in particular harmed the English political system. It's
no coincidence that William, Duke of Normandy, conquered England a century or so later, in 1066.
Then there was the Laki eruption in 1783, with another immense outpouring of lava in Ice
land. This eruption emitted large volumes of poisonous gas, including fluoride and
sulfur dioxide chemicals that poisoned half of Iceland's livestock. The gas cloud blew
over Scandinavia as well, causing many deaths and hardships that included a long famine.
There were many deaths further south in Western Europe, as well, in 1783. Then came
several years of extreme weather. Among other problems was a shortfall in farm output.
This led to a drop in tax receipts for governments across the continent. In France,
King Louis XVI eventually had to summon the Estates General to ask for new taxes.
Instead, he wound up with the French Revolution.
The San Francisco earthquake of 1906, for example, caused many banks and insurance
companies in the U.S. and Britain to fail. This led to the Panic of 1907. The Panic of
1907 led directly to the creation of the U.S. Federal Reserve in 1913.
He goes on to provide some modern day statistics regarding the volcano:
According to Eurocontrol, which operates the airspace in Europe, about 20,000 flights
per day are canceled. By my back-of-the envelope calculation, that translates into about
1.5 million barrels of jet fuel per day that's not being burned to power airliners. That's
just shy of 2% of total daily world oil demand. So with this fast hit to demand, it's
no wonder that the price of oil has dropped about $4 per barrel in the past week.
Meanwhile world trade is indeed suffering. Perishable items, from flowers to exotic fish
and fruits, are rotting on the loading docks. High-value items like computer chips and
diamonds are sitting in secure warehouses. Much other airfreight is just stacking up on the
pallets. FedEx and UPS together carry about $1.3 billion of goods per day between
North America and Europe. Right now, it's almost all shut down.
The ripples are global. For example, Chinese auto assembly lines are slowing down
due to lack of electronic components from Germany. There are reports of mass layoffs in
nations as far apart as Kenya and Colombia, due to the inability to export goods via
airfreight to Europe. Then consider all the personal and business disruptions and
expenses from casual and business travelers unable to fly.
NIT WITs (Nationalize, Inflate, and Tax . Whatever It Takes) in Washington
Taken from a Casey Daily Dispatch:
Key among the tools used by governments around the globe to fund their steady expansion are the rights they take unto themselves to Nationalize, Tax, and Inflate, or NIT for short.
And they don't stop there. If a problem arises that threatens the status quo in any way, governments these days are quick to do "Whatever It Takes" (WIT). And we.re not just talking about snuffing out Arab bogeymen in Dubai hotels or handing over $180 billion to failing insurance companies - these days, if a problem is considered serious enough, no obvious limits need apply.
I've wondered why some of my C++ programs seem to run slower than I think they should be
running. Then I came across an article regarding Checked Iterators, and it become clearer
to me where some of my execution speed issues could be. By default, in debug mode,
all standard iterators are bounds checked. This checking can cause a slow down in
execution speed when using standard iterators extensively.
The solution is to set certain macros to selectively enable and disable the checking
on proven code. A
Microsoft MSDN article on Checked Iterators
describes the two symbols used for controlling the checked iterators feature:
_SECURE_SCL: If defined as 1, unsafe iterator use causes a runtime error. If defined as 0, checked iterators are disabled. The exact behavior of the runtime error depends on the value of _SECURE_SCL_THROWS. The default value for _SECURE_SCL is 1, meaning checked iterators are enabled by default.
_SECURE_SCL_THROWS: If defined as 1, an out of range iterator use causes an exception at runtime. If defined as 0, the program is terminated by calling invalid_parameter. The default value for _SECURE_SCL_THROWS is 0, meaning the program will be terminated by default. Requires _SECURE_SCL to also be defined.
Seduction is part of my stock in trade in the diplomatic service. Public lies are shouted in councils and courts, but secret truths are whispered in beds. -- The Miocene Arrow
"Everything will be okay in the end. If it's not okay, it's not the end. -- an email footer
"You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat." -- Albert Einstein
<< One of the really cool things about the camera is its cooling system. >> -- One would hope so. -- email foot from Dan Drasin
Holmes opined "It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts".
"Undecidable by reduction to the halting problem in general, though apparently possible for straight-line code (no loops/recursion) through the brute-force method of generate all paths and send them to a theorem prover to prove equivalence." -- email foot from Scott McMurray
"The American dream is not owning a house; it.s every individual having the opportunity to achieve their full, God-given ability, and each generation having the responsibility to leave the country better off and better-positioned than the next so that our children and grandchildren can have a better way of life than we have" -- former U.S. Comptroller General David Walker
"It's is not, it isn't ain't, and it's it's, not its, if you mean it
is. If you don't, it's its. Then too, it's hers. It isn't her's. It isn't our's either. It's ours, and likewise yours and theirs." -- Oxford University Press, Edpress News
"If you don't do it right the first time, you'll just have to do it again." -- Jack T. Hankins,
"The more sophisticated the technology, the more vulnerable it is to primitive attack. People often overlook the obvious." -- Dr. Who,
"Everything should be as simple as possible, and no simpler" -- Einstein
"Common sense is not so common" -- Voltaire
"Stability leads to instability. The more stable things become and the longer things are stable, the more unstable they will be when the crisis hits." -- Hyman Minsky
"Never appeal to a man's 'better nature,' he may not have one. Invoking his self-interest gives you more leverage."
"Unfortunately, inefficiency scales really well." -- Kevin Lawton
"Davenport answered with a lift of his own glass, sniffed, then sipped. Tantalizingly delicious, deliciously tantalizing. He saw that it could be dangerous--a taste too easily acquired for something not so easily acquired." -- Foundations Friends.
"Let me state the obvious and posit the known--nothing is so overlooked as the obvious and nothing is so mysterious as the known" -- Foundations Friends
"It is what you do in life, not what torments you in your soul, that matters. And who you are in life, not who you fear you might become." Bast to Herzer in There Will Be Dragons
Disclaimer: This site may include market analysis. All ideas, opinions, and/or
forecasts, expressed or implied herein, are for informational purposes only and should not
be construed as a recommendation to invest, trade, and/or speculate in the markets. Any
investments, trades, and/or speculations made in light of the ideas, opinions, and/or
forecasts, expressed or implied herein, are committed at your own risk, financial or
otherwise.