2007 Sep 24 - Mon
Implementing SpeedyCGI/PersistentPerl on Debian Etch
I've recently moved away from Perl and Mason for web hosting into the world of C++ and
CGI with Wt.
But for my own future reference, for if/when I need to do something with Perl in Apache,
I can refer to Falko Timme's article on
Speeding Up Perl
Scripts With SpeedyCGI/PersistentPerl On Debian Etch as a reference on how to make Perl
fast in Apache.
[/OpenSource/Debian/ArticleLinks]
permanent link
Embedded Debian
Enterprise Networking has a short article on some recent specialized motherboards running
embedded Debian. They have an article called
Voyage Linux: The Comforts of Debian. Embedded.. A number of specific
distributions are mentioned, such as m0n0wall, uClibc, Pyramid, and iMedia. The article is
about a new contender called Voyage Linux.
The article is about getting Voyage Linux installed and running on flash card. It is the
first in a series for ultimately getting an internet-connection sharing firewall in place.
[/OpenSource/Debian/ArticleLinks]
permanent link
phoneAlarm for the PocketPC, and GPS Also
I believe the HTC Kaiser is now out and availble. It is getting good reviews as a good
device that does have everything, including the kitchen sink. The only think I havn't heard
yet is whether or not it has good battery life (for a device with more memory and more
functionality, does it come with a power price?).
A reviewer at Pocket PC Thoughts mentioned a piece of software the may prove useful with
the device, at least it did for him... something called
PhoneAlarm by
pocketMAx.
On the GPS side of things, the reviewer mentioned GPS products called Pharos Ostia and
Delorme. These are add-on packages. The HTC does come bundled with TOm Tom Navigator, but
maps are extra cost, which may be true with the other two mentioned items.
[/Personal/Technology]
permanent link
Sentiment Indicators with Option Statistics
When I have the time, I've been spending it adding capabilities to my trading software.
My current addition is an Option Watcher. Nothing to really trade, just some thing to watch
the state a complete options list for the trading instrument in which I'm interested.
A while ago, or rather, a long while ago, I looked into trading options. That turned out
to be
a very complicated endeavor. I decided to set it aside and come back to it later. Now
isn't quite the 'later' I was thinking about, but I've been keeping them in mind. An
article by Jeff Neal from Optionetics expanded upon the recent thoughts I've been having
with his article called
OUTSIDE THE BOX:
Option Statistics as Sentiment Indicators. Here are a few choice exerpts where he says
things better than I can:
One of the best ways to get a handle on sentiment in a particular stock is to monitor
the
activity of option traders. For instance, monitoring and tracking option volume and option
open interest changes can reveal important information in regards to the expectations of
traders, as well as how they may be positioned.
Option volume when unusually high can often times can identify explosive moves and
identifies for the trader just where the action is taking place.
To best forecast a directional change in the market, it is important to monitor the daily
gyrations of open interest. The thinking is that small investors are typically on the wrong
side of a rally, an unusual increase or decline in the open interest of put and/or calls
often signal a change in directional bias. Usually an abnormal rise or decline in open
interest sends a contrarian type signal to the sentiment trader.
[/Trading/AutomatedTrading]
permanent link
Recent Comments on Scalping in Elite Trader Forums
"The market is all about watching the same areas as the pros are and following their
lead. Breakouts on low volume are rookies taking the shares off the pro's hands with no clue
they can't fuel the next leg." -- mcichocki
"Some people can't scalp and others can't swing trade, it's all about finding what works
for your mind." -- mcichocki
"learn to read tape and remember key numbers from tape support and resistance. The tape
is true buying and selling so if you know what your doing with it you will know key levels
to watch for breaks with heavy buyers/sellers." -- mcichocki (If one has a good memory,
tape reading works. For those of us with less than good memories, having a program that
shows total 'volume at price' opens up new vistas of information, similar to what you find
when reading a tape.)
"Scalping can work at any market conditions, up, down, sideway... there are slow but no
garbage days for a good scalper." -- enlightedtrader
"It's not unusual for a master scalper to obtain a daily trading outcome greater than the
daily range although I've never seen it done on a consistently basis, day after day, often
yes but not always." -- QuantPlus
"Signals always abound and noise has little impact - this is the zone where noise is
tradable. " -- yoohoo
"The fact remains that the market zig-zags in every timeframe, and he who captures most
of the distance covered has lower risk and greater return. Of course there us a cut off
point where size is the final limiting factor for the scalper." -- yoohoo
"A zig-zag is longer than a straight line. The maximum profits are gained by trading the
waves - that's simple maths." -- yoohoo
[/Trading]
permanent link
HOW-TO: SSH and Remote File Systems
Debian Admin has an article called
"Mount a remote file system through ssh using sshfs".
Here is the introduction of the how-to:
If you want to access a remote file system through ssh you need to install sshfs. sshfs is
a filesystem client based on the SSH File Transfer Protocol. Since most SSH servers already
support this protocol it is very easy to set up: i.e. on the server side there's nothing to
do. On the client side mounting the file system is as easy as logging into the server with
ssh.
[/OpenSource/Debian]
permanent link
2007 Sep 20 - Thu
SmartQuant QuantDeveloper & DataCenter Release
SmartQuant has released a revision
to DataCenter and
QuantDeveloper. DataCenter and QuantDeveloper are at the following revision levels:
DataCenter
Version 2.3.3 (20-Sep-2007)
QuantDeveloper Enterprise Edition
Version 2.7.1 (20-Sep-2007)
QuantDeveloper Source Code
Version 2.6.2 (10-Jul-2007)
* Recent Versions available through
version control
[/Trading/SmartQuant/Releases]
permanent link
2007 Sep 18 - Tue
DirectSound Error 88780078
Sometime towards the end of July, I installed Windows XP latest sound stuff (Windows
Media, DirectSound, etc), version 10 I
think. I had been putting it off for a while. I had heard about licensing issues, codec
problems, and such. In a moment of weakness, I clicked the Windows Update button and
installed it. What a pain.
WinAmp plays fine most of the time. At some point in time, when it isnt' playing, and I
'do something', I have no idea yet, and when I go back to playing WinAmp, I'll get a message
like:
Bad DirectSound Driver. Please install proper drivers or select another device in
configuration.
Error code: 88780078
Most of the time, I reboot my computer, and things magically fix themselves.
Upon further searching for solutions, someone pointed out a possible simple fix for my
problmem of the DirectSound 88780078 problem:
- Right click on My Computer
- Manage
- Device Manager
- go down to where the exclamation point is
- Right click to Disable, then Enable it.
In this case, it solved my problem. Now I'd like to know how it breaks randomly in the
first place. Some have said it has to do with VMWare. I do have VMWare workstation
installed, but hasn't been running for a while.
Any suggestions?
I did come across
Microsoft Knowledge Base article 29030. You can run a Windows Installer
Cleanup Utility. It's first screen shows, ironically, "Welcome to the Windows Installer
Clean Up Installation Wizard". When running the application after the installation, I don't
see anything having to do with sound, so just cancelled out.
There are more interesting solutions at
TechSpot.
[/Personal/Technology/AudioPhonics]
permanent link
2007 Sep 17 - Mon
Configuring Wheel Mouse in Debian
I'm running Debian in VMWare in Workstation mode. My wheel mouse doesn't work
automatically. I had to have the following configuration in /etc/X11/xorg.conf for it to
work:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
Option "Buttons" "5"
EndSection
[/OpenSource/Debian]
permanent link
Debian's Firefox is Known as Ice Weasel, and breaks Google Toolbar
Ok, I might be behind the times somewhat, I havn't used Debian in workstation mode in a
while. To date, I've been using it substantially in console/server
mode. Today I found trying to get Firefox to run, while in workstation mode, to be an
'interesting' experience.
Using Debian's built-in browser, Konqueror, I went to www.getfirefox.com to download
Firefox.
The download worked fine, but figuring out how to install/run it was.., not possible.
A little web searching told me that due to some differences of opinion between MOzilla
and Debian, Debian has decided to do things a bit differently. With an
'apt-get install firefox', you get the latest software, but under a new name: IceWeasel.
All well and fine. Until I wanted to use the Google Toolbar.
It isn't possible to install the toolbar because Google checks the user agent string.
So... the trick is to change the user agent string. Put 'about:config' in the address bar.
You'll get a bunch of entries. To make it easier to find the needed one, put 'useragent' in
the filter line. In the line for 'general.useragent.extra.firefox', change 'iceweasel' to
'Firefox'. Restart firefox. The Google Toolbar is now available.
So in summary, don't download Firefox from the Mozilla web site. Instead, obtain the
Debian install package. A change to the useragent will be needed to make it 'more
compatible' with plugins and such.
The other plugin I use is FireBug with Firefox. This is a handy tool for troubleshooting
CSS and HTML code on a web page. Two cool things with FireBug: 1) as you pass over html
code, it's area on the web page is highlighted, and 2) you can edit HTML and CSS entries to
see their immediate results reflected in the browser. Installing this tool took one
trick... when downloading, do a 'run with' firefox. A new window will open allowing the
install to proceed.
[/OpenSource/Debian]
permanent link
2007 Sep 16 - Sun
Rock Paper Scissors
I think my first introduction to Rock Paper Scissors was in Dr. Who episode. I thought
it was just something the writers made up. Later I was introduced to it when figuring out
who was going to buy the beer with a best two out of three.
Now I find out that there is an actual web site devoted to the game:
World RPS Society, with a by-line of
"Serving the Needs of Decision Makers Since 1918". Even yearly tournaments are established
locally as well as internationally. The site even has on-line training software to get you
introduced in the privacy of your own desk.
There is even a book about Rock Paper Scissors. Well actually more than one... Amazon has 18 listed,
some of which are only names for novels.
The basic rules of Rock Paper Scissors are:
- Rock wins against Scissors,
- Scissors wins against Paper
- Paper wins against Rock
When used in a series of three moves, there are 27 possible combinations. Each set of
three combinations is a gambit. These are the eight most popular gambits:
- Avalanche (RRR)
- Bureaucrat (PPP)
- Crescendo (PSR)
- Dénouement (RSP)
- Fistfull o. Dollars (RPP)
- Paper Dolls (PSS)
- Scissor Sandwich (PSP)
- Toolbox (SSS)
The one thing I notice about these gambits is that with seven of the eight, you can
sequence readily from one to another in double gambit pairs, whereas with the eighth, the
ToolBox, it can't be the first of a double gambit. This would tend to indicate a bias
towards seven of the eight. But I suppose that is a starting point for
advanced strategies.
Further information in the advanced section indicates that there are "Exclusive
Strategies", a strategy where a player will only play two of the three throws. The opponent
plays based upon the fact that the missing through has to come up at some time.
If you read the site, you'll find that there is all sorts of psychology and
strategy wrapped up in the
game. Almost like playing the prisoner's delima.
[/Personal]
permanent link
2007 Sep 15 - Sat
Full Text RSS Blosxom Feeds
I previously wrote about getting a basic
RSS Feed going. That feed had titles only in it. I wanted to get text into it as well. I had some
problems getting it going. I think that if I ran my content through a validator like
FEED Validator to start, I might have made progress faster. The key thing is that I need
to write my text articles with out ampersands in the titles.
Anyway, I used information from
Operational Dynamics web
site to figure out the special command to include formatted content with 'CDATA'. I also used his plugin.
Here is the content of my files (wget may be necessary to get the content pure):
By removing a couple of minor elements in head.rss, the plug in rss20 won't be needed.
I would really like to get blog comments going. I tried them once but got too much spam. My next project is to migrate to Moveable Type.
Hopefully they have better ways of handling comments.
[/OpenSource/blosxom]
permanent link
NistNet and Netem: WAN Empairment Emulators
A client was putting together and testing an equipment package that was to be
installed in their Disaster Recovery site. After getting everything up and running and
tested, they wanted to test the replication performance in a 'real' WAN environment. One
way to do this is to use a real WAN. The other way is to simulate a WAN. Consdering their
DR site is several thousand miles away, simulating the WAN would be logistically better.
To emulate a WAN, one needs to be able to control:
- variable delay
- delay distribution
- packet loss
- packet re-ordering
- rate control
In researching possible tools for emulating an WAN environment, I came across two open
source tools WAN emulation tools. The first one I saw was
NIST Net. Although it hasn't
received too many recent updates, it does still have an active forum. And it appears to be
quite sophisticated. It does require an x-windows for a library during compile time. With
X11 Forewarding, you don't need to burden the WAN emulating computer with a GUI, can
use another computer as a terminal. You can reference one of my
Cygwin pages on how to
remote X11 applications.
It is said that NIST Net is a bit better than NetEm as NIST Net has tighter controls on
its delay mechanisms.
I came across the second wAN Emulator purely by chance. In reading through some of the
NIST Net forum articles, one of the mentioned that the Linux Kernel already has one built
in: NetEm. One may
need to enable it and rebuld the kernel. It doesn't have a user interface, but instead
relies on command line utilities. Someone did do up a GUI for NetEm, but has removed it for
one reason or another.
A newsgroup article has a reference to where it can be obtained. Someone
else mentioned that MasterShaper could be used as an interface to the capabilities of NetEm.
Page 15 of a slide presentation
shows command line examples for running NIST Net as well as NetEm. Another
document
offers up an example of using NetEm.
I was able to get NIST Net built on a Debian box. But the DR equipment had to be shipped
out before I could actually give it a try. Oh well, I'll find another project to try it out
on. Here are some build instructions for a recent Debian Kernel. There are some variations
regarding availability of config.h depending upon the 2.6 kernel version you have available.
When obtaining the NistNet code in one of the commands below, some of the instructions
assume you've expanded the library in /usr/src. As such, when the library is expanded,
you'll need to change four lines in /usr/src/nistnet-3.0a/kernel/knistnet.c from
return ippt->func(skb, dev, ippt);
to:
return ippt->func(skb, dev, ippt, NULL);
You may need to comment out the following line in
/usr/src/nistnet-3.0a/kernel/nistnet_table.c:
/* typedef enum {false = FALSE, true = TRUE} boolean; */
You may need to add a dummy config.h in
/usr/src/linux-headers-2.6.21-2-686/include/linux/ with:
#ifndef _LINUX_CONFIG_H
#define _LINUX_CONFIG_H
#include
#endif
You should also confirm that this file exists (depending upon your kernel version):
/usr/src/linux-headers-2.6.21-2-686/include/linux/autoconf.h
Here are remaining installation instructions:
apt-get install vlan
apt-get install linux-headers-2.6.21-2-686
apt-get install x-window-system-core
apt-get install libxaw-headers libxmu-headers
apt-get install libxp-dev
apt-get install xaw3dg-dev
# might need:
ln -s /usr/lib/libXaw7.so.7 /usr/lib/libXaw.so
wget http://www-x.antd.nist.gov/nistnet/dist/nistnet.2.0.12c.tar.gz
tar -zxvf nistnet.2.0.12c.tar.gz
./configure
make
make install
depmod
modprobe nistnet
lsmod | grep nistnet
cnistnet -G
[/OpenSource/Debian/MasterShaper]
permanent link
Trading Site of the Day -- Trade-Ideas: Real Time Idea and Signal Generation
In another
article, I referenced the Trade-Ideas Blog. I don't recall ever making it
over to their web site. Today I made it over to their site by way of an article there on
Scalp Traders Access
Their Best Trades with Trade-Ideas. They have links from their to a page they have
whichreferences a bunch of their
signals. I've coded
several of those signals elsewhere, but this opens a whole new vista on possible trading
opportunities from a scalping perspective.
Another
page references how their
analysis engine uses different time frames, different data types, and different statistics
to come up with its signals.
I like how they do
mini charts to
provide an idea of daily and weekly price movements.
[/Trading/SiteOfTheDay/D200709]
permanent link
Burning Water aka Breaking Water Into Hydrogen/Oxygen aka Electrolysis
A few days ago, there was a much talked about article regarding
Radio Frequencies Help Burn Salt Water. Even
John Mauldin referenced it.
Many people have gone off the deep end thinking that this is the next best thing to water running
up hill. By looking a carefully at the video and reading the article, and doing a little research, one
can understand what is going on. First a little background:
I'd say the radio frequency energy acts in a
way similar to feeding electrical current directly through the salt solution (radio frequencies are the
byproducts of an oscillating electrical current). The video showed us 'something' using between 200 and
400 Watts, about the equivalent of four standard 100W light bulbs. They were careful to not show us the
frequencies used though.
Thinking more about how
the hydrogen is produced and recombined, I seem to recall article and/or video from many moons ago
about once you got
this burning reaction going, you could keep the mix running by continually adding water. (No this is not
perpetual motion because you are still supplying a source of energy--the water). Anyone remember
research on this type of thing? In some blogs, there were comments suggesting that even though
this a a decent
reaction, but because it was not self-perpetuating, it isn't good. I beg to differ. Just think about
oil for a moment.
Untold amounts of energy is spent in finding it, drilling it, pumping it, refining it, and
delivering it. Yet there is enough energy left over to fuel our cars and planes. Could it not be said
that even though we lose energy in breaking the bonds to produce hydrogen, that there may be more
energy left
over to do other stuff? Looking at it another way, electrical energy is used to break the bond, and we
get heat energy (although inefficient to use) when the bond is recombined.
I did find a reference to a
Water Engine, but
it wasn't quite what I was after. Besides, I think the scientist in that post misses the point.
Yes, you can't
use the same amount of water and expect to keep re-using it. But if you keep adding water into the
system, you keep refueling the system, just like putting more gas into your auto fuel tank. An in most
places, water is quite abundant. Burning water may be more or less as energy efficient as burning oil,
but if I recall correctly (!), there is more water than oil.
If someone could point me to a reference where some one demonstrates a 'burning water' engine--an
engine where you prime it with hydrogen, feed it water, and keep it burning--I'd be
most appreciative.
But all this is water under the bridge, in comparison to what the video was really showing. It shows
that if you can deliver the special particles to the site of a cancerous growth, and use radio waves to
activate the particles, you can kill the cancer cells and leave everything else intact. Now that is
what one would call 'precision bombing'.
Update: Through a Google link that passed through my site, I came across Stan Meyer and a Water Fuel Cell. If you
look those up, you'll see all sorts of stories, conspiracies, and strange information floating around. Who/What can you
beleive.
For other alternate energy systems, PESWiki looks interesting.
[/Personal/Technology]
permanent link
Word Lists with a Calculator
FreshMeat, contrary to any
derogatory images it may conjure in your mind, is a site dedicated to publicizing releases
of open source software. It is a great combo to
SourceForge.
Today on Freshmeat was a link to
Frink, "a practical calculating
tool and programming language designed to help us all to better understand the world around
us, to help us get calculations right without getting bogged down in the mechanics, and to
make a tool that's really useful in the real world. It tracks units of measure (feet,
meters, kilograms, watts, etc.) through all calculations, allowing you to make physical
calculations easily, to mix units of measure transparently, and ensures that the answers
come out right." It deserves a special link on my toolbar.
One of the things it know how to do is word searches. Cheating at Scrabble is one
suggested use. The interesting point, though, is that in one of the descriptions, he points
to word list he uses: Grady Ward's Moby, a lexicon project. It has a hyphenator, part-of-speach
definitions, pronunciator, Shakespeare, Thesaurus, and 610,000 words and phrases. It shows
as a last update being around the year 2000 or so.
[/Personal/SoftwareDevelopment]
permanent link
2007 Sep 14 - Fri
Software Development, Coders, and C++ Libraries
I grew up with Assembler, Pascal, then C, then C++, then C#, and now I'm back to C++.
I've found
that C# makes things easier for graphical programming, but it feels sluggish when doing some
computationally intensive
things. I've since moved back to C++. Development time has increased on some stuff, but I
think things are better, and I derive more pleasure from C++ development. And C++ has a
rich heritage and a rich library universe. This entry goes through some interesting things
I've found.
One of the first libraries I came across was the
Boost Libraries. I believe I've written
about these before. A few specifics of interest include Regular Expressions, a soon to be
released Time Series, date/time operations, some geometry constructs, state machine tools,
and, well, the list goes on.
A few days ago, in looking for sophisticated Web Application tool kit.
Wt: a C++ Web Toolkit appears to
fit that niche very well. It also handles Ajax like functionality.
To assist with web development and layout,
Firebug: A
Firefox Addon might be of value for page layout issues. Although it has nothing to do
with C++, which is the main topic here, it does have to do with finding a viable solution
for checking out web page design.
Earlier today, I came across dzone: fresh
links for developers. It has a wealth of links to articles written by developers for
developers, developers of all categories and skill sets. Doing a search on C++ comes up
with quite a list of articles.
One of the links pointed to
The Programmicon. This article is mostly game based, but gaming shares
cross-functionality with many disciplines. This once had two links to resources regarding
finance. I was first introduced to Multivariate Embedding Methods by Carol Alexander on
page 405 of her book Market Models. Although she won a prize for best price predictor using
a model with that concept, I havn't been completely sold on it's applicability. If I had
time I'd try it out. However, a key part of embedding is nearest neighbor analysis. The
Programmicon points to a site providing
ANN: A Library for
Approximate Nearest Neighbor Searching. It also points to
TMV - Template Matrix/Vector
Library for C++, something else upon which embedding algorithms are built. Embeddings
are based upon chaos theory. The concept is to try to find self-similarity in continous
time. When similarities are found, you've got a predictor. Easier to say than do.
dzone also re-introduced me to LUA: An
Embedded Programming Language.
Debian
Administration discusses how to incorporate it in to C++. I'm thinking it might be
useful for scripting signals in a network monitoring package or defining charts in a
financial modelling solution, or performing information searches in text analysis tools, or
performing event & signal handling in a Cricket grapher.cgi rewrite. IEEE Software has an
8 page article called
Traveling Light, the Lua Way.
Kind of related is Kepler: Lua based web development platform.
During a brief flirtation with Fuzzy Logic, where one needs to evalute line crossings and
area calcuations, I realized Computational Geometry might be of use. The C++ library
Wykobi might be of value for optimized
algorithms.
The Code Project
discusses its use.
I'm currently 'enjoying' MFC based development. I'm wondering if, since I'm still at a
relatively early stage, I should be using
TrollTech's Qt: Cross-Platform Rich
Client Development Framework.
From a Microsoft perspective,
Somasegar's Weblog has an article on 'Visual C++ Futures'. There are more
than 200 user comments summing up needs, wants, and desires in that universe.
[/Trading/AutomatedTrading]
permanent link
IP Addressing Best Practices (plus VRF and VLAN ideas)
I've encountered many weird and wonderful IP Addressing schemes during my consulting
engagements. During my early years, I'm sure I've contributed some less than optimal ideas
into the mix. I'm going to try to mend my ways and introduce some ideas that I think make
things better.
Since the advent of Network Address Translation, network designers/architects/engineers
have three basic address ranges from which to choose. These address ranges are based upon
what is known as RFC 1918
- Address Allocation for Private Internets. The three ranges are:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
These are, what some call non-routable addresses. To be more specific, routers routing
public addresses, will typically drop (not route) packets having destination addresses from
these ranges. Of course, private networks are free to route these addressess as they see
fit.
The commentary below assumes a basic knowledge of ip addressing, subnet allocation,
host addressing, and routing.
When starting with small networks, a network installer may
simply choose some random /24 block from one of the three ranges, and start assigning
addresses to all devices on the network to that block. When installing IP Phones, some
similar rationale may be used to pick some onother block for the phones. Some rationales
that I've see included:
- let's choose 10.20.10.x for workstations and 10.20.20.x for phones, it keeps them in a
similar big block, and keeps the octents nice workable numbers
- let's choose 10.20.30.x for workstations and 192.168.30.x for phones, it keeps them
separate and identifiable, but yet similar in one octet
- let's add 172.20.30.x as a network management block as it is something completely
different and identifiable as being not normal traffic
I'm sure you can come up with many other mechanisms. But what happens when you want to
get another office joined in? Then suddenly one has a bunch of different blocks one has to
add into a routing table. The lazy answer would be to simply use a statement like 'network
10.0.0.0'. There. All routes for that block are automatically known and added into the
routing table (syntax and concept varies a bit depending upon which routing protocol you
use).
I'm not sure if that is an optimal solution. I generally like to be very specific about
which subnets or supernets I allow into a network table. With addressing scattered through
three different address ranges, detailed route table maintenance becomes time consuming.
I like to use route aggregation whenever possible.
I left that statement by itself as it is a very powerful statement. It is also a
strong, guiding principle in network/routing table design.
I've used that to come up with a hierarchical addressing structure that works with many
of my client sites. There are some scalability issues for very large organizations with
many large offices. For the majority of organizations, I think the following scheme works
well. As I'm in Bermuda, Bermuda is the center of my universe, and the numbering is based
partially on that concept. There is nothing saying you can't change things to match your
own geographic realities.
Since the 10/8 address range has the most number of addresses to work with, I use that
as a basis for most schemes. The hiearchy I use follows this pattern. I'll break the last
three octets into a bit map and assign meanings:
octet bitmap:
00001010.wwwxxxxx.yyyyzzzz.00000000
bitmap meanings:
www: region (NA (001), SA (010), Europe (011), PacRim (101), Asia (100)
xxxxx: country [ BM 1, CA 2, US 3, UK 1, IR 2 ]
yyyy: city [ HAM,BM 1; NY,US 1; PA,US 2 ]
zzzz: VLAN
The region numberse, starting at 1, are loosley based upon contintents and how
inter-country fibres are run.
These categories help with aggregation. Within a region, countries are numbered, starting
at 1. Within a country, cities are numbered starting at 1. I start the numbering for each
bit section at 1, as I use the 000, 00000, and 0000 portions for addressing of inter-region,
inter-country, and inter-city links. You can't really aggregate those addresses into the
routes of either site, so they need to be kept separate.
Therefore, for a site in Hamilton, Bermuda, addressing would start at 10.33.16.0.
Addresses from the range 10.33.0.0 to 10.33.15.255 would be used for inter-city links.
Addresses from 10.32.0.0 to 10.32.255.255 would be used for inter country links. Addresses
from 10.0.0.0 to 10.31.255.255 would be used for inter-region links. Ip address utilization
in this range is acknowledged to be quite sparse.
You'll note that this scheme breaks when you have coverage in more than 15 cities. Therefor
the scheme needs to be adjusted based upon how many locations you have, how many
buildings in each location, and how many floors in each location. It doesn't matter how the
bit map is structured, just so long as some rule for aggregation is followed as the level of
aggregation grows.
At each site, I've been refining a strategy for vlan and ip address block assignments.
Sixteen is a base(2) number, and therefore easy to aggregate. I assign 16 /24 blocks and 16
VLANs per site using a strategy similar to:
+0 Subnets for /30 links
+1 Servers
+2 Server ILO Ports
+3 SAN, iSCSI Traffic
+4 Voice Servers & Gateways
+5 Lab/Classroom/Testing
+6 Spare, To Be Assigned
+7 DMZ
+8 Workstations
+9 Phones
+10 Wireless Corporate
+11 Wireless Phones
+12 Wireless Guest
+13 Wired Guest
+14 Printers
+15 Network Management
The first set of eight blocks are server related. The second block of eight are client
related. If an organization has mulitiple floors, conceivably a sequential block of eight
would be assigned to each additional floor.
For VLAN numbering, I have a couple of different schemes. One scheme starts at VLAN 100
and assigns vlans 100 through 115 to each /24.
A second scheme is more complicated. In some locations, I use VRF's to segragate and
route traffic. VRF's are handy when you have guest traffic you want to keep separate from
corporate traffic. Cisco has a number of SRND documents on how this is accomplished.
Anyway, I've used up to 5 segragations: 1 global routing table plus four VRF's:
1XX global 100
2XX vrfExterior 200
3XX vrfData 300
4XX vrfVoice 400
5XX vrfGuest 500
The first column is are the VLAN identifying numbers, the second is the VRF name, and the
third column is the OSPF process number. By adding this numbering scheme to the VLAN types
previously provided, the following table might be used, where column 1 is the VLAN ID,
column 2 is a relative offset of a sequential VLAN numbering system, and the third column is
the description:
+0 Subnets for /30 links
301 +1 Servers
302 +2 Server ILO Ports
303 +3 SAN, iSCSI Traffic
304 +4 Voice Servers & Gateways
305 +5 Lab/Classroom/Testing
+6 To Be Assigned
+7 DMZ
308 +8 Workstations
309 +9 Phones
310 +10 Wireless Corporate
311 +11 Wireless Phones
512 +12 Wireless Guest
513 +13 Wired Guest
314 +14 Printers
115 +15 Network Management
Some don't have VLANs as they don't exist as VLANS, but are address ranges uses elsewhere
at the site.
Here are some additional VLAN assignments I'll use:
- 1: turned off, or not used at all
- 2: trunk native VLAN
- 3: 802.1x unauhtorized clients
- 20 - 29: switch SPAN ports for various monitoring activities
- 299: vrfExterior router to firewall exterior
- 399: vrfInterior router to firewall interior
- 599: vrfGuest router to firewall interior
Here is a finished table for showing address assignments for two different locations:
VLAN Offset BM Office NY Office
+0 10.33.16.0 10.35.16.0 Subnets for /30 links and loopbacks
301 +1 10.33.17.0 10.35.17.0 Servers
302 +2 10.33.18.0 10.35.18.0 Server ILO Ports
303 +3 10.33.19.0 10.35.19.0 SAN, iSCSI Traffic
304 +4 10.33.20.0 10.35.20.0 Voice Servers & Gateways
305 +5 10.33.21.0 10.35.21.0 Lab/Classroom/Testing
+6 10.33.22.0 10.35.22.0 To Be Assigned
+7 10.33.23.0 10.35.23.0 DMZ
308 +8 10.33.24.0 10.35.24.0 Workstations
309 +9 10.33.25.0 10.35.25.0 Phones
310 +10 10.33.26.0 10.35.26.0 Wireless Corporate
311 +11 10.33.27.0 10.35.27.0 Wireless Phones
512 +12 10.33.28.0 10.35.28.0 Wireless Guest
513 +13 10.33.29.0 10.35.29.0 Wired Guest
314 +14 10.33.30.0 10.35.30.0 Printers
115 +15 10.33.31.0 10.35.31.0 Network Management
Default Gateway is x.x.x.254
This type of scheme, when implemented from the start, provides easy expansion of an organization's network,
provides an ability to add protections between network devices, and simplifies inter-site routing.
[/OpenSource/Debian/AddressManagement]
permanent link
LightFactory for Lighting BMDS' Production of The Sisterhood
It was an interesting experience, to say the least, in terms of being a first time lead
lighting designer, introducing new equipment to the theatre, and learning a new piece of
software.
All in all, the time was well spent. Live cue updates during rehearsals were simplified
through a logical layout of lighting instruments in LightFactory.
In the diagram, instruments are assigned positions based upon the area they
illuminate rather than the location they occupy in the grid. As such, in the diagram,
there are five groups of four instruments. The top one of the diamond is a down light, the
left was an amber 'warm' wash light, the right was a blue 'cold' wash, and the bottom was a
lavender wash for the dark skinned actor, (the remainder of the cast were light skinned).
The channel over each of the four ColorCommand lights controlled the intensity. Each
ColorCommand had three colors (magenta, yellow, and cyan), plus a beam width control.
Some of the specials were: 35: the bar bottle highlight, 32: a spot for a solo cast
member talking to the audience, 19: a red downlight for the lovers, 2: the greenish
downlight on the phone, 17,23: plant decoration, and 48: audience lights for intermission.
Over five acts, there were a total of 44 cues
for the show, including one for doing a 15% on all lights for a lamp test.
The biggest hassle with LightFactory was in using the color lights. It took some time to
work around some issues of assigning colors to a group of color lights. I think this has
now been fixed. From what I see in the bug reports, there were some fixes implemented for
refreshing Channel Groups and Palettes in a more timely fashion. I thought about updating
the software once the bugs were fixed, but decided to run the software as it was through the
show: better an enemy you know than one you don't. I'll update the software for the next
show.
[/Personal/Lighting]
permanent link
2007 Sep 13 - Thu
Computers Are Infallible -- NOT
A recent article at Kernel Trap entitled
Data Errors During Drive Communication indicates that
"An ongoing study on datasets of several Petabytes have shown that there can be 'silent data
corruption' at rates much larger than one might naively expect from the expected error rates
in RAID arrays and the expected probability of single bit uncorrected errors in hard disks".
This is an interesting read. I used to blame my ocmputer problems on
Random Alpha
Particles. I guess I can now expand my horizons.
[/Personal/Technology]
permanent link
Trading Site of the Day -- Teresa Lo: Power Swings
Teresa Lo is a retired securities analyst who has a site called
PowerSwings. Here analytical skills
and powers of commentary show through. Two pages of interest, one on
Volatility and one on
Intraday Trading Strategies are recent articles with some good meat.
For intraday trading, she boils it down to:
- Use small discretionary setups to scalp the first half-hour, especially when the
market is really emotional. I particularly like small flags and gap plays documented in The
Ultimate Trading Course.
- Avoid getting killed after the first hour, when the market usually settles down and
starts to chop. Stay out.
- Get on board the train if it leaves the station in the afternoon for a trend day into
the close.
Once I get into the swing of things, I'm hoping I can break her rule #2, which is where I
think with contrarian Limit orders, one can make money in that sort of market condition.
She also promotes here Ultimate Trading Course. I don't know if it is a good thing or a
bad thing, perhaps someone could let me know.
Her site links to a number of high quality blogs.
WSJ Real Time Economics for one.
[/Trading/SiteOfTheDay/D200709]
permanent link
Snow Squall Inn
If you happen to be the Wiscasset, Maine area, and need a place to stay, try out
Snow Squall Inn. My good friend
Melanie and her husband Paul own and operate the 7 room Bed & Breakfast. I hope to see
them in October and check out their place.
[/Personal/Business]
permanent link
Lighting for Moliere's Sisterhood, the 80's Version
From this month's production of Moliere's The Sisterhood at
Bermuda Musical and Dramatic Society, here are three
shots of the set during the Pre-Show, Intermission, and Post-Show
Decoration cues. During the periods of activity, the set is fully lit, with subtle dimming
of unused area. Unused areas would be the bar and the sofas at various times. This is my
first show where I was lead on lighting design and programming.
The goal of the color splashes were to offset the black and white patterns of the main
set. The color changes were also meant to occur in a somewhat early morning (cool of the
day), mid day (warmer, hot sun), early evening sequence (heavy on sunset colors). The
purple and green in the second were used to highlight the only actor with a color wardrobe,
Trissotin, who had bright green and purple in his clothing.
I used three HighEnd ColorCommand lights to light the French Doors. One light was aimed
at one door from far stage right, one was aimed at the other door from up stage center, and
a third provided a splash across the backdrop from up stage center. The beam width was
adjustable to provide a beam or a wash as I needed.
Although the pictures don't show it dramatically, a purple color splash was 'thrown' on
the red backdrop in the hallway to highlight the phone. A slightly greenish downlight
served to show the phone in stark contrast.
A square shuttered light was used to provide a highlight on the bottles at the bar
throughout the play.
[/Personal/Lighting]
permanent link
2007 Sep 11 - Tue
Recent Paper on Profitability of Technical Stock Trading
There is a recent, very readable paper from Stephan Schulmeister called
The
Profitability of Technical Stock
Trading has Moved from Daily to
Intraday Data. His abstract goes like this:
This paper investigates how technical trading systems exploit the momentum and reversal
effects in the S&P 500 spot and futures market. The former is exploited by trend-following
models, while the latter by contrarian models. In total, the performance of 2580 widely used
models is analyzed. When based on daily data, the profitability of technical stock trading has
steadily declined since 1960 and has become unprofitable over the 1990s. However, when
based on 30-minutes-data the same models produce an average gross return of 8.8% per
year between 1983 and 2000. These results do not change substantially when trading is
simulated over six subperiods. Those 25 models which performed best over the most recent
subperiod produce a significantly higher gross return over the subsequent subperiod than all
models. Over the out-of-sample-period 2001-2006 the 2580 models perform much worse than
between 1983 and 2000. This result could be due to stock markets becoming more efficient or
to stock price trends shifting from 30-minutes-prices to prices of higher frequencies.
One of the interesting comments he makes is that contrarian strategies appear to be more profitable than do trending strategies.
In the article, the author offers up some possible reasons why technical trading is harder (but I should temper that remark and
say that successful trading is more profitable with 'higher frequency' data--5 minute bars over 30 minute bars or daily data):
The decline in the profitability of technical trading based on daily data could be explained in
two different ways. The "adaptive market hypothesis. (Lo, 2004; Neely-Weller-Ulrich, 2006)
holds that asset markets have become gradually more efficient, partly because learning to
exploit profit opportunities wipes them out, partly because information technologies steadily
improve market efficiency (Ohlson, 2004). The second explanation holds that technical
traders have been increasingly using intraday data instead of daily data. This development
could have caused intraday price movements to become more persistent and, hence,
exploitable by technical models. At the same time price changes on the basis of daily data
might have become more erratic. This would then cause technical trading to become less
profitable based on daily prices (but not on intraday prices).
Another interesting quote I came across regarding how everyone's trades get jumbled together, and what trader's think about it:
... traders have to form expectations about expectations of all other
traders (Keynes. "beauty contest. problem).
[/Trading/TechnicalAnalysis]
permanent link
2007 Sep 10 - Mon
Internet Information Analysis
In follow up to a previous post I did on news analysis, I came across
Monitor110. They don't release much
about how they do stuff, but they do release some information which sets the bar as to what
can be done in terms of analysis of information found in various sorts of repositories found
on the web.
[/Trading/AutomatedTrading]
permanent link
2007 Sep 09 - Sun
VC++ MultiCast Delegate Template
In follow up to my article on
Fast Delegates
back in June, I used the C++ STL (Standard Template Library) to create a simple, one parameter Multicast Delegate for
C++. The code provided here provides a mechanism for creating a Multicast Delegate by incorporating the FastDelegate
library. I used the 'vector' template from the STL to implement dynamically adding and removing object method calls to
the Delegate.
#pragma once
#include <vector>
#include "FastDelegate.h"
// http://www.codeproject.com/cpp/FastDelegate.asp
template<class RO> class Delegate {
// RO: Return Object in call
public:
typedef FastDelegate1<RO> OnMessageHandler;
void Add( OnMessageHandler function );
void Remove( OnMessageHandler function );
bool IsEmpty();
void operator()( RO );
protected:
private:
std::vector<OnMessageHandler> rOnFD;
};
template<class RO> void Delegate<RO>::Add(
OnMessageHandler function ) {
rOnFD.push_back( function );
}
template<class RO> void Delegate<RO>::Remove(
OnMessageHandler function ) {
std::vector<OnMessageHandler>::iterator rOnFD_Iter;
rOnFD_Iter = rOnFD.begin();
while ( rOnFD.end() != rOnFD_Iter ) {
if ( function == *rOnFD_Iter ) {
rOnFD_Iter.erase( rOnFD_Iter );
break;
}
rOnFD_Iter++;
}
}
template<class RO> bool Delegate<RO>::IsEmpty() {
return rOnFD.empty();
}
template<class RO> void Delegate<RO>::operator()( RO ro ) {
std::vector<OnMessageHandler>::iterator rOnFD_Iter;
rOnFD_Iter = rOnFD.begin();
while ( rOnFD.end() != rOnFD_Iter ) {
(*rOnFD_Iter)( ro );
rOnFD_Iter++;
}
}
// =======
// Here is a declaration of three events, with each event receiving a
// pointer to a object with class of CIQFSymbol:
Delegate<CIQFSymbol*> OnFundamentalMessage, OnUpdateMessage, OnSummaryMessage;
// Here is how to add a delegate to the MultiCast Delegate:
pSym->OnFundamentalMessage.Add(
MakeDelegate( this, &CGTScalpDlg::EmitDataFundamental ) );
// EmitDataFundamental is declared with:
void EmitDataFundamental( CIQFSymbol *pSym );
// The mulicast delegate can then be invoked with:
OnFundamentalMessage( this );
// =======
Caveats: I havn't proven that Delegate's Remove method works as intended yet, but theoretically it should, as
coded. Proper initialization, deconstruction cleanup, and thread safety are left as exercises for the reader.
[/Personal/SoftwareDevelopment]
permanent link
2007 Sep 08 - Sat
BootDisk.com
Bootdisk.com is a handy site for
creating all sorts of bootable media for all sorts of operating systems and hardware.
[/Personal/Technology]
permanent link
Trading Site of the Day -- Non Dealing Desk: Forum for Forex
For those who want to get inside the wild-west business of forex,
Non Dealing Desk Forum appears to be
a good one with which to start.
It has quite a number of forum sections, but then ones at the top of the list have to do
with 'Non-Dealing Desk Brokers', 'Dealing Desk Brokers', and 'Broker Selection Criteria'.
Other forums feature real life examples of what can happen to a trader when submitting
trades and stop orders.
Forum participants discuss the pros and cons of various brokers and of what to watch out
for.
So even though one sees many advertisments in print and the web for $500 sign up
accounts, they really are a guise for taking your money the easy way if you aren't prepared
for trading desks trading against you and taking out stops on a regular basis.
So really, in the world of forex, it is caveat emptor. Choose your broker wisely, and
above all, really hnow what you are doing (which ironically, may not be possible for the
neophyte trying to get started).
[/Trading/SiteOfTheDay/D200709]
permanent link
2007 Sep 06 - Thu
News Analysis
I subscribe to DTN's IQFeed data
streams. (If you'd like to sign up, let me know I'll do a referral for you.) Anyway, in
addition to the usual equity, futures, and options feeds, they have a news feed. Each feed
entry has a media source indicator, a headline, a list of associated symbols, and a index
number for obtaining the story content.
I thought it might be an interesting project to process each incoming message for its
symbol list and do some sort of key word analysis to see if one can get a 'mood' of the
article. This might provide some interesting trading ideas for the day.
I don't have the
time to do it right now, but am recording my thoughts so I can
come back to it a little later.
Two recent articles by Paul C. Tetlock in the The Journal of Finance, one in the June 2007 issue titled "Giving Content
to Investor Sentiment: The Role of Media in the Stock Market", and one in an upcoming issue
called "More Than Words: Quantifying Language to Measure Firms. Fundamentals", got me
thinking about this again.
One of the articles pointed to the General Inquirer, no, not a racy tabloid but a "a computer-assisted approach for content analyses
of textual data". Although GI references an application useful for researches, I think the
interesting content resides with the spreadsheet of categorized words they have. These
words can be used to classify the 'mood' of processed text.
The site also points to a book called "The Content Analysis Guidebook" by Kimberly A.
Neuendorf as one that might shed further background on the concept. A while ago, I was
taking a look at content anlysis from a different perspective, something akin to classifying
market analysis and trading blogs. Some additional book references are linked below.
An application called Yoshikoder is an
already built application that can take the GI word lists and process portions of text and
produce analysis summaries.
A brief web search brought up a couple of blogs that show some perspective on how to put
analysis into perspective:
Some 'possibly' related books:
[/Trading/AutomatedTrading]
permanent link
2007 Sep 03 - Mon
Linux, Wine, MFC, Win32 API
for the trading application I'm developing, I was thinking that I'd only be able to run
it on a Windows machine due to the fact that a couple of vendor supplied libraries are only
supplied as Microsoft Windows .dll's and MFC C++ libraries. Perhaps such is not the case
any more.
For whatever reason, I recalled that Wine is a "compatibility layer for running Windows programs". They say
they can handle WinSock32 calls, which is probably one of the primary hard things to do.
So I'm hoping I can take the supplied vendor .dlls, my MFC .dlls, and load them into the
wine layer, and they'll run. As a result, I can make further use of some of my remotely
hosted Linux servers for hosting my trading platform, without resorting to installing either
VMWare editions or real Windows platforms.
While on the subject of MFC and such, I want to record a few Win32 API/MFC sites that
will help in some of the code development:
[/Trading/AutomatedTrading]
permanent link
2007 Sep 01 - Sat
The Royal Gazette's Review of Sisterhood
Here is what Jennifer Hind of the Royal Gazette had to say of opening night for the
Sisterhood:
Black and white with a touch of colour/classy and classic/heartless and cold?
Getting the balance right is one of the themes of this modern translation and
reinterpretation of the classic 17th century Les Femmes Savantes by Moliere. The Sisterhood,
R.R. Bolt's 1980s take on this comedy of manners and motives, explores sibling rivalry, the
battle of the sexes and the conflict between intellectual snobbery and personal integrity at
a cracking pace in rhyming couplets, replete with clever puns, irony, witty repartee and
physical comedy.
It is also marvellously self-aware, with one character suggesting all the books should be
burned . save the collection of Moliere as they must be worth a fortune.
The current production at the Daylesford Theatre, directed by Suzann McLean and produced
by
Jo Shane, is a clever realisation of a very clever play and well worth the price of
admission.
Sisters Armande and Henriette are like chalk and cheese, with Armande seeking maternal
approval through the parroting of her mother's and aunt's intellectual pretensions and
aggressive feminism, while Henriette declares herself more interested in the sensory world
than the world of the intellect.
The rivalry of these siblings, 'marriage is slavery' versus 'sex is better than
speculative
thought', is compounded by the fact that the poor but charming Clitandre, spurned by a
scornful Armande, finds a warm welcome in the arms of Henriette. The young lovers'
relationship is supported by Henriette's sympathetic but ineffective father, while her
domineering mother has other plans for her daughter: marriage to a poet of dubious ability
and large ambition. The parental battle of the sexes is spiced with a liberal sprinkling of
a saucy maid, a lascivious aunt and a disloyal pal.
How the happy ending is contrived with a little help from their friends, involves a
clever
twist and a surprising revelation.
Very little, if anything, has been left to chance in this production. Even the music
between
the scenes, such as Madonna's 'Material Girl', and Hall and Oates' 'Maneater', have been
carefully chosen to underscore the themes of the play. The scene is set with a black and
white décor, carefully styled but unnatural, closed off from the colourful world of nature
by a pair of French doors. The black and white theme is carried over to the costumes, with
one exception: the flamboyant Trissotin appears as a Technicolor Boy George.
Enhancing the witty lines is a lot of delicious stage business . my favourite being the
'musical chairs' on the sofa in the second act. But even the manner in which Chrysale deals
with the 'meaty matters' concerning the very down-to-earth Martine and the solving of the
Rubik's cube puzzle show the deft hand of a thoughtful director.
There are generally strong performances from the cast, and the few pauses and flubbed
lines
could be put down to first-night nerves. That the play's rhyming couplets are never
intrusive and even sound almost natural attests to the competence with which they are
delivered. I am reluctant to single out individual performances, as all the acting was
solid, with even the minor characters making striking impact.
I came away thoroughly amused and anxious to dust off the Hits of the 80s album buried at
the back of my CD collection.
The play runs until September 8, with no performances on September 2 or September 3.
Tickets
($25) are available from the BMDS box office 7 p.m. to 8 p.m. on performance nights.
[/Personal/Lighting]
permanent link
|