May 2008 Archives

National spelling bee sample test

| | Comments (0) | TrackBacks (0)

My national spelling bee effort. Apparently, this would have been a really good score.

Your score is 25. Congratulations! With a score like that, you could have qualified for the Quarterfinals.

WordMy Spelling
beignetvenier
pinyinpinyin
illegibleillegible
Caribbeancaribbean
homagehomage
cygnetcygnet
harassmentharassment
loquacityloquacity
Pyrrhicpyrrhic
intermittenceintermittence
eideticeidetic
tremolotremolo
Appaloosaappaloosa
epilepsyepilepsy
mustardmustard
altogetheraltogether
avariceavarice
misciblemiscible
syringesyringe
galimatiasgallamadeous
cacoëtheskakaouithes
nonpareilnonpareil
midriffmidriff
sinecuresinecure
guernseyguernsey
yetiyeti

Cheat sheets

| | Comments (0) | TrackBacks (0)

Cheat Sheet: All Cheat Sheets in one page

The Manual.su's project. All cheat sheets, round-ups, quick reference cards, quick reference guides and quick reference sheets in one page. The only one you need. Cheat sheets on all things computer:

  • languages (C#, python, Java, MatLab, Perl, ruby, HTML, CSS),
  • operating Systems (Debian, Linux, Solaris, Windows),
  • search engines (google, Yahoo),
  • web browsers (FireFox, Internet Explorer),
  • SQL (Sybase, SQL Server, Oracle, MySQL),
  • email (GMail, Yahoo mail),
  • programs (PhotoShop, vi, emacs).

Trackback spam

| | Comments (0) | TrackBacks (0)

Wow, I had no idea the trackback spam situation was so bad. I decided to check the comments on my site today: no comments. I checked my trackbacks: 555 trackbacks, 554 of them automatically marked as spam. And the other one was spam, too.

In checking the sources, I found one stand out website for sourcing spam links to my site: weebly.com. The site purports to be an easy-to-use blog provider for the non-technical person, but that's not even the start of the story. Weebly.com appears to be the favored starting point of porn spammers. Here are the blogs at weebly that deal with only a specialized porn topic: seven sites all using this specific phrase. Most other blog sites have no hits on this phrase. Looks to me as if this is the preferred location for trackback spammers.

This is what a real apology should sound like. Of course, Otto has the advantage here of hanging Archie out a window by his ankles at the time, and not everyone will have this edge when requesting an apology.

Archie: All right, all right, I apologize.

Otto: You're really sorry?

Archie: I'm really, really, sorry. I apologize unreservedly.

Otto: You take it back?

Archie: I do, I offer a complete and utter retraction. The imputation was totally without basis in fact, and was in no way fair comment, and was motivated purely by malice. And I deeply regret any distress that my comments may have caused you, or your family, and I hereby undertake not to repeat any such slander at any time in the future.

Otto: Ok.

An amazing presentation of data

You've never seen data presented like this. With the drama and urgency of a sportscaster, statistics guru Hans Rosling debunks myths about the so-called "developing world."

Dev 102

| | Comments (0) | TrackBacks (0)

I came across this website the other day. It has a fair amount of interesting programming information, mostly about C# and .NET development.

There are a couple of links on Firefox plugins ([Five more FireFox plugins...], [Five FireFox plugins...]) that I liked:

  1. [GreaseMonkey]
    Allows you to customize the way a webpage displays using small bits of JavaScript.

  2. [ColorZilla]
    Advanced Eyedropper, ColorPicker, Page Zoomer and other colorful goodies

  3. [Poster]
    A developer tool for interacting with web services and other web resources that lets you make HTTP requests, set the entity body, and content type. This allows you to interact with web services and inspect the results.

  4. [JavaScript Debugger]
    Venkman is the code name for Mozilla's JavaScript Debugger. Venkman aims to provide a powerful JavaScript debugging environment for Mozilla based browsers.

  5. [X-Ray]
    See the tags on a page without viewing the sourcecode.

  6. [CSSMate]
    Inline CSS Editing Evolved.

  7. [FireShot]
    FireShot is a Firefox extension that creates screenshots of web pages. Unlike other extensions, this plugin provides a set of editing and annotation tools, which let users quickly modify captures and insert text and graphical annotations.

  8. [Web Developer]
    Adds a menu and a toolbar with various web developer tools.

  9. [ViewSourceWith]
    Open page source, CSS and JS files, modify content, view server side pages, etc.

  10. [FireBug]
    Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

I can't admit to having used them all, partly because I upgraded to FireFox 3.0 this week and very few of these plugins are compatible -- only FireShot and ViewSourceWIth are. I am most excited to add FireShot and FireBug. I'll have to wait for the FF 3.0 version of the latter.

[2008-06-15: Firebug for Firefox 3.0 has finally been released.]

I also really liked a couple of other short articles:

Wi-Fi Detector Shirt

| | Comments (0) | TrackBacks (0)

Just when you realized that you could not live without a t-shirt with a built-in graphic equalizer that responds to sound comes the next geek t-shirt: one that detects 802.11 wi-fi signals and displays the strength of the signal.

[Show-off t-shirt from x-treme geek] $29.95
[Wi-Fi detector t-shirt from ThinkGeek] $29.99

US State Quarters

| | Comments (2) | TrackBacks (4)

I'm collecting the US state quarters. I am missing only three two quarters from the Philadelphia mint: Arizona, Alaska, and Hawaii. The Denver mint is a different story. I am missing these:

Missing Denver mint quarters
YearStates
1999 Pennsylvania
2001 Rhode Island
2003 Illinois, Missouri
2004 Michigan, Iowa, Wisconsin
2005 California, Oregon, Kansas
2007 Montana, Wyoming
2008 New Mexico, Arizona, Alaska, Hawaii

In New York, the quarters in circulation are overwhelmingly from Philadelphia. By my estimate, the Philadelphia coins are 90% of the state quarters and Denver are 10%, so collecting Denver coins is much harder.

I have extras of these Philadelphia quarters available for trading: Iowa, Illinois, Pennsylvania, Kansas, and New Mexico. I've noticed that these coins are encountered less frequently than other Philadelphia mint coins. Please contact me if you are interested in a trade for a coin I don't have.



2008-06-04: found WY, MT, PA, MO, and KS.




2008-06-09: traded for IL, IA, and RI. I now need only Denver mint coins for Michigan, Wisconsin, New Mexico, Arizona, Alaska, and Hawaii plus Philadelphia mint coins of Arizona, Alaska, and Hawaii.




2008-07-01: traded for Michigan and Wisconsin. I now need only Denver mint coins for New Mexico, Arizona, Alaska, and Hawaii plus Philadelphia mint coins of Arizona, Alaska, and Hawaii.




2008-07-24: traded for Arizona. I now need only Denver mint coins for New Mexico, Alaska, and Hawaii plus Philadelphia mint coins of Arizona, Alaska, and Hawaii.




2008-07-25: I got Arizona-P in my change. I now need only Denver mint coins for New Mexico, Alaska, and Hawaii plus Philadelphia mint coins of Alaska and Hawaii.

Topical NYC links

| | Comments (0) | TrackBacks (0)

Racing the Planet

| | Comments (0) | TrackBacks (0)

So Lori is in China and Mongolia as a medical volunteer for the Racing the Planet event, Gobi March, which is a "seven-day, six-stage, 250-kilometer footrace across the Gobi Desert of China." The race takes place in Xinjiang Uygur province, 4000 kilometers west of Beijing. The race site is in the extreme northwest of China, close to Kazakhstan, Kyrgyzstan, Tajikistan, and Pakistan.

Father Ted clips

| | Comments (0) | TrackBacks (0)

Another page with associated sounds from my previous website. Not everyone's cup of tea, but I miss Father Ted.

The lottery project

| | Comments (0) | TrackBacks (0)

Another project I did several years ago that deserves resurrection is the Lottery Project, in which I make an estimate of the revenue from a single jackpot of the MegaMillions lottery.

Pretty code

| | Comments (0) | TrackBacks (0)

Thanks to several google-translated Japanese Movable Type blog entries [makotokw, kazuno, and tadateto], I've finally figured out how to hack MT to get python code pretty-printed. (To read these Japanese articles, I recommend searching using google and then pressing Translate this page.) The code is downloaded from google and the original idea was from Thomas Guest.

To get this to work, you have to do four things:

  1. Add google's prettify.css stylesheet to your header page template
    <link rel="stylesheet" href="/mt-static/css/prettify.css" type="text/css" />
  2. Add google's prettify.js JavaScript to you header page template
    <script type="text/javascript" src="/mt-static/js/prettify.js"> </script>
  3. Get your body.onload to call prettyPrint()
    <body class="mt-main-index layout-wtt" onload="prettyPrint();">
  4. Mark the sections that you want pretty-printed
    <pre class="prettyprint">

The third step is the most involved. You have to change three templates:

  1. Page
    <MTSetVar name="body_onload" value="prettyPrint();">
    <MTIfCommentsAccepted>
        <$MTSetVar name="body_onload" value="prettyPrint();individualArchivesOnLoad(commenter_name)"$>
    </MTIfCommentsAccepted>
  2. Entry
    <MTSetVar name="body_onload" value="prettyPrint();">
    <MTIfCommentsAccepted><
        $MTSetVar name="body_onload" value="prettyPrint();individualArchivesOnLoad(commenter_name)"$>
    </MTIfCommentsAccepted>
    
  3. Comment Preview
    <MTSetVar name="body_onload" value="prettyPrint();individualArchivesOnLoad(commenter_name)">
    



2008-06-27: Did I say three templates? I meant five. Here are two more templates to change:

  1. Search results
    <MTSetVar name="body_onload" value="prettyPrint();">
    
  2. Archive index
    <MTSetVar name="body_onload" value="prettyPrint();">
    

RefDesk

| | Comments (0) | TrackBacks (0)

RefDesk is a phenomenal collection of links to every imaginable sort of reference work:

  • google front-ends
  • dictionaries
  • encyclopedias
  • news sources
  • news photos
  • news videos
  • business and people searches
  • everything else

It is an improbably large page of links categorized to be useful. Via [ aldaily ]

Movable Type and Webhosting4life.com

| | Comments (0) | TrackBacks (0)

If you are using Movable Type and using WebHosting4Life.com as your ISP, you will not be able to get comments and trackbacks to work until you turn off the WebHosting4Life setting, Security Guard. If, whenever you post a comment on your blog, you get this error message:

Webhost4life Application Firewall Alert

Your request triggered an alert! If you feel that you have received this page in error, please contact the administrator of this web site.

Then you need to do this:

  1. Login to WebHosting4Life.com
  2. Go to Security
  3. Select Security Guard
  4. Set to OFF

It took me three weeks of googling this before I put in the system request and got this fixed. I hope you find this posting sooner.

The Secret Science of Price and Volume

| | Comments (0) | TrackBacks (0)

The Secret Science of Price and Volume: Techniques for Spotting Market Trends, Hot Sectors, and the Best Stocks is yet another book on trading that I came across at Amazon. I'm familiar with looking at price and volume and I've seen top-down methods of stock selection, but I haven't seen a really integrated method. In particular, I haven't seen something that gives a good idea of where the market is heading, and that's one of the things this method relies on:

  • Gauge the sentiment of a market to determine if the trend is bullish or bearish, and whether a possible high or low is nearby
  • Evaluate breadth, volume, and momentum in order to identify triggers to enter the market
  • Find the best performing sectors that are aligned with the market
  • Select the strongest stocks within those sectors

Sell & Sell Short

| | Comments (0) | TrackBacks (0)

I saw Sell & Sell Short at Barnes and Noble the other day. Naturally, I returned home and ordered it from Amazon.

I've shorted a couple of times, but I think that I have to do it more often to make money in all markets. There aren't a lot of good books out there on shorting, so I am looking forward to working through this.

Here are some topics covered in the book:

  • How to control risk by linking the placement of your protective stop with your money management and position size
  • Where not to put your protective stops
  • Why using moving averages as profit targets works well in the early stages of an upmove
  • Why channels or envelopes are better targets when you are riding a trending stock
  • How to use support/resistance areas for profit targets and stop losses in long-term position trades
  • How to adjust your targets when market conditions change or your stock blows through the initial profit target

NYC Ultimate Frisbee groups on Yahoo

| | Comments (0) | TrackBacks (0)

Some Ultimate Frisbee Yahoo groups I subscribe to. NYC-centric.

[nycpul]
[nograssforyou]

Technical Yahoo groups

| | Comments (0) | TrackBacks (0)

Here are a couple of technical groups I subscribe to:

[AltDotNet]
[win_tech_off_topic]

The descriptions of technical analysis algorithms are a bit annoying. They are written to calculate a single point, assuming a programming model that is non-vectorized. I really don't get why the algorithms are so poorly described.

Take this description of Money Flow Index as an example.

First off, this:

MoneyFlowIndex = 100 - (100 / (1 + MoneyRatio))

is the same as this:

MoneyFlowIndex = 100 * PositiveMoneyFlow /  (PositiveMoneyFlow + NegativeMoneyFlow)

or even:

MoneyFlowIndex = 100 * PositiveMoneyFlow / TotalMoneyFlow

Now we have a formula which works even when NegativeMoneyFlow is zero.

We have just two concepts, PositiveMoneyFlow and TotalMoneyFlow:

pmf = sum(mfi for mfi, reti in zip(mf, returns) if reti > 0)
tmf = sum(mf)
MoneyFlowIndex = pmf / tmf

where:

typ = [ (p.high + p.low + p.close) / 3 for p in prices ]
vol = [ p.volume for p in prices ]
returns = [ (typ[i] - typ[i-1]) / typ[i-1] 
    for i in range(1, len(typ)) ]

Okay, we turned a price series into typical prices, created daily returns and money flows from the typical prices, produced the positive money flow and total money flow, and finally got the money flow index. What did it buy us to do it with series like this?

Lots. The original algorithm totally glosses over the fact that we don't want a single money flow index -- we want a time series of money flow indexes. All of the basic series are viewed through a window, and windowing like this makes the basic algorithm really inefficient. The Positive Money Flow for the range 0..n differs in only two places from the range 1..n+1 (pmf[0] drops and pmf[n+1] is added) but a naive implementation will sum the series as if there were no overlap. To do this properly, we need series that have partial sums.

If you want to add up the m-sized windows on data of size n, you can optimize by creating a series that is the running total of the data seen so far and subtracting element[x] from element[x+m] to get the x'th window. You will iterate from 0 to n-m inclusive, giving you n-m+1 windows of size m. Here is how you make your running total:

def runningTotal(series) :
    result, s = [0], 0
    for ss in series :
        s += ss
        result.append(s)
    return result

Then we can write a summedSeries() function:

def summedSeries (series, length) :
    s = runningTotal(series)
    for i in xrange(len(s) - length) :
        yield s[i + length] - s[i]

and rewrite the Money Flow Index function like this:

pmf = ((mfi if reti > 0 else 0) 
    for mfi, reti in zip(mf, returns) )
return [ 100.0 * pos/tot for pos, tot in 
    zip(summedSeries(pmf, n), summedSeries(mf, n)) ]

Now we have an optimized function that works on price and volume time series and returns a Money Flow Index time series. And once you get your head around python, it even feels right.

[ mfi.py ] [ msft.csv ]

Technical analysis library

| | Comments (0) | TrackBacks (0)

I had a brief look at the C++ source for TA-Lib: Technical Analysis Library today. It's an open source project I mentioned the other day. It may well be good code, but reading through it is really hard sledding. It's evidently all machine-generated, and I can't work out where the source is. (If I have the choice of reading machine-generated C++ or the source, I'll choose the source.)

But it's not a dead loss. The documentation on the associated site is pretty strong and gives good references. In particular, there are links to FM Labs, and I like the descriptions given of TA algorithms there.

I'm also intrigued by the Technical Analysis Programmer's Toolkit. I'll download a demo and report back on its suitability.

More open source financial applications

| | Comments (0) | TrackBacks (0)

Open source projects that do technical analysis, portfolio management, and FIX. See also [Open Source Trading Systems]

[TA-Lib: Technical Analysis Library]
Technical analysis library with indicators like ADX, MACD, RSI, Stochastic, TRIX... includes also candlestick pattern recognition. Useful for trading application developers using either Excel, .NET, Mono, Java, Perl or C/C++.

[QuickFIX]
QuickFIX is the world's first Open Source C++ FIX (Financial Information eXchange) engine, helping financial institutions easily integrate with each other.

[FIX4NET]
A 100% pure .NET Financial Information eXchange (FIX) protocol library. Includes a TCP/IP engine, messages (4.0/4.2/4.4), and message database.

[nFIX]
nFix is a 100% native .NET object orientated FIX (Financial Information eXchange) API and engine.

[OneUnified.GeneticProgramming]
A C# implementation of a Genetic Programming method for optimizing a financial trading strategy. Most code designed for use with SmartQuant's QD/OQ products, but key code can be extracted for use in other projects.

[PortfolioLib]
A free/open-source C++ library for financial portfolio management. At its core, it aims to represent a collection of financial instruments as defined by QuantLib, called a Portfolio.

[ScreenFire.Net Financial Charts]
ScreenFire.Net Financial Charts is a financial market charting API for the .Net framework. It is a sub-part of the TradeWeapon project here at sourceforge.net. It will focus on prividing financial market charts like OHLC, Candlestick charts and Scatter

Last night, I bought this book. There are several very positive reviews of the book from Brett Steenbarger and Charles Kirk, two traders I really respect:

In Technical Analysis Using Multiple Timeframes, Brian Shannon takes the reader through the essentials of technical analysis and then illustrates how to integrate those into a coherent trading methodology. From the phases of stock movement to price/volume relationships and risk management, Brian brings his topics to life with concrete and practical illustrations and explanations. This is an excellent resource for all technically-oriented traders; anyone who has enjoyed Brian's video insights on the Alpha Trends blog will surely appreciate the way he synthesizes those lessons in this book.

Brett N. Steenbarger, Ph.D.

and

When Brian contacted me awhile back to read and provide a review of his new book Technical Analysis Using Multiple Timeframes, I couldn't have been more excited. Brian has been blogging about stocks for a long time and his video chart presentations are a unique offering that many find useful. His intense passion for the market and deep love of the game itself is evident in everything Brian does and shares with his readers.

In my opinion, Brian's book is an excellent resource because he is great instructor. Unlike many books on trading written by traders who frankly have a difficult time explaining their methods, Brian shows his skills by breaking down relatively complex ideas in a straightforward manner. Ultimately this makes his book particularly good for traders who are just starting out on the learning curve and those who've found other trading books too complex or difficult to implement in the real world.

Charles Kirk

I hadn't heard of Brian Shannon before but I am really looking forward to getting my hands on this book.

Financial industry publications

| | Comments (0) | TrackBacks (0)

Lifted from a friend's website.

All 120 Crayon Names, Color Codes and Fun Facts

Using Amazon FPS

| | Comments (0) | TrackBacks (0)

CodeProject article on using Amazon FPS [Amazon Flexible Payment Service] in .NET. Uses WinForms, ASP.Net and C#.

Task Scheduler Class Library for .NET

| | Comments (0) | TrackBacks (0)

Get that job at google

| | Comments (0) | TrackBacks (0)

CHESS tester for multithreaded code

CHESS is a tool for systematically testing multithreaded code. Given a concurrent test, CHESS systematically drives the test along all possible thread interleavings. It uses model-checking techniques to explore effectively the enormously large state space of interleavings and provides quantified coverage guarantees. CHESS can check for assertions, deadlocks, livelocks, and data races. On finding an error, CHESS can reproduce the thread interleaving that exposed an error. CHESS is research tool developed by Microsoft Research.

House medical reviews

| | Comments (0) | TrackBacks (0)

I came across this website a long time ago. If you are going to watch House, you have to read PoliteDissent to hear a medical opinion of the show. It's the best of a number of sites that rate House.

Hulu

| | Comments (0) | TrackBacks (0)

Wow, this is so great. Hulu, a website I had not even heard of until today, has TV shows streamed over the internet. For most people, this would be no big deal. I have no cable, though, and use the TV only for watching DVDs.

Right now, I am catching up on House episodes which I would otherwise have to wait until, oh, September, to see on DVD.

House's Head (Part 1 of 2)

I will derive!

| | Comments (0) | TrackBacks (0)

A one-link YouTube post. Student talks through his calculus problems, set to Gloria Gaynor's I Will Survive.

So I thought back to calculus,
Way back to Newton and to Leibniz
And to problems just like this.
And just like that when I had given up all hope,
I said, "Nope! There's just one way to find that slope!"

And so now I -- I will derive.
Find the derivative of x position with respect to time.
It's as easy as can be
Just have to take dx/dt.
I will derive --I will derive.

[I WIll Derive]

Alexa top 500 sites in US

| | Comments (0) | TrackBacks (0)

This list is a bit surprising. I'd expect all of the sites to be familiar to me, and there are certainly one I don't use and have never heard of: live.com, photobucket.com, go.com, rapidshare.com, adultfriendfinder.com (just to pick on sites in the top 25).

[Alexa top 500 sites in US]

CIA textbook on evaluating intelligence

| | Comments (0) | TrackBacks (0)

[Psychology of Intelligence Analysis]

The articles are based on reviewing cognitive psychology literature concerning how people process information to make judgments on incomplete and ambiguous information. I selected the experiments and findings that seem most relevant to intelligence analysis and most in need of communication to intelligence analysts. I then translated the technical reports into language that intelligence analysts can understand and interpreted the relevance of these findings to the problems intelligence analysts face.

Functional programming how-to

| | Comments (0) | TrackBacks (0)
A tour of Python's features suitable for implementing programs in a functional style.

How to Tell if a Rally Is Real

| | Comments (0) | TrackBacks (0)

The New York Times on signals for a real rally:

  • willingness to buy speculative (small-cap) assets
  • strength in sensitive sectors, like technology and consumer discretionary
  • strengthening dollar

Updated Three Little Pigs

| | Comments (0) | TrackBacks (0)
Wherein the three little pigs diversify their portfolios to withstand market stresses.

Life as a Disney character

| | Comments (0) | TrackBacks (0)
An ex-Jack Sparrow spills on life at the Magic Kingdom.

Writing strong arguments

| | Comments (0) | TrackBacks (0)
Following Paul Graham's article How to Disagree on the hierarchy of arguments, CreateDebate.com has published How to Write Strong Arguments.


A Map for Saturday

| | Comments (0) | TrackBacks (0)

This is a 90 minute DVD about the backpackers' life. Lifted from Cool Tools:

Don't watch this documentary unless you are ready to quit your job. It's about the joys and woes of long-term traveling. It's impossible to watch this fun film and not confront the fact that you are here instead of there, out on the road, soaking up the mysteries of the world, with all-you-can-eat $3 dinners and $5 rooms, backpacking around the world for a year, as the filmmaker himself did. This kind of vagabonding is more a state of mind than a state of motion. Something weird happens when you travel longer than 10 days, and that wonderful transformation (which no one can explain to their family when they return) is what this superbly written, fabulously edited, deeply personal and wonderfully likeable documentary is all about.

BedandBreakfast.com

| | Comments (0) | TrackBacks (0)

BedandBreakfast has a database of 28,000 B&Bs worldwide, including nearly 6,000 that can be booked through the site -- with photos and expanded descriptions.

Unusual Hotels of the World

| | Comments (0) | TrackBacks (0)

Unusual Hotels of the World lists 127 lighthouses, prisons, caves, and other unique places to spend the night.

Google blog search

| | Comments (0) | TrackBacks (0)

Google has a special page for searching blogs.
[blogsearch]

Weber 87886 Chimney Starter

| | Comments (0) | TrackBacks (0)

Barbecuing is occasionally complicated by unreliable charcoal bricks. Sometimes they don't start even when you douse them with that nasty kerosene fire starter. I'm expecting that this low-tech solution from Weber will work better. It's basically a custom-made chimney for igniting charcoal bricks. The coals draw air from the bottom and the fire spreads up the chimney.

2008-07-17: I've been using this product for two months now and I have a few comments to add:

  • No liquid fire starter required
    Or recommended.
  • Intensity
    Within a short period, the fire is consistently red-hot. The coals are amazingly hot throughout.
  • Ease of starting
    Every time I have used this, I've had one-match fires. Just one match was needed to get it started. You put two sheets of newspaper in the bottom and that's enough to get the coals started.