Monday, July 26, 2010

Filling, But Ghetto, Bachelor Dinner

So, this is what happens when you are the unfortunate soul that faces the following challenges:

a) lack of culinary skills
b) have no instant/canned food available
c) too lazy to go out and buy some food

Seriously ghetto, but at least it tastes alright. Here's the recipe for those who want to punish themselves.

1 Cup rice
2 Budget Gourmet frozen dinners of your choice (I realize this might be considered instant, but it hardly makes for a filling meal on its own).
1 Pitan/Century Egg
Maggi for added taste

So lame. Ha ha.

Friday, July 23, 2010

Sold Some Calls and Arena Update

Sold Linear Technology (LLTC) August $33 Calls at 0.50 (covering the entire position).
Sold Cisco Systems (CSCO) August $24 Calls at 0.43 (covering 3/4 of the position).

I am willing to buy the calls back at a loss if the stocks move above the strike price, but within reason, come expiration day.

And, it turns out that the market sees the Vivus (VVUS) FDA setback as a positive for Arena Pharmaceutical (ARNA). Shares are now at their 52-week high, $5.91. Just three weeks ago shares were trading near $3.

Thursday, July 15, 2010

Down She Goes

Looks like FDA advisory panel rejects Vivus' drug, Qnexa. Arena Pharmaceuticals (ARNA) shares gave back all of its gains today plus some. If this were a big position I'd be kicking myself big time for not dumping it when it was up 30%. What a wild day for ARNA: Day's Range = 3.57 - 5.72.

Arena Pharmaceutical Pop

Shares of Arena Pharmaceutical (ARNA) got a nice pop today (up 30% at the moment) following yesterday's announcement that the New England Journal of Medicine would be publishing positive results of the two-year BLOOM (Behavioral Modification and Lorcaserin for Overweight and Obesity Management) trial. From what I read, the safety profile for Lorcaserin was better than that of current drugs used for obesity treatment, such as Xenical.

Additionally, one of Arena's main competitors, Vivus (VVUS), is currently awaiting the recommendation by the FDA advisory panel. That result should be coming out later today.

In any case, I don't have a large position in ARNA. But, it's still nice to see such a move in the stock.

Tuesday, July 13, 2010

Permutation Generation in the Unix Shell

Okay, so I was chatting with a friend over lunch recently about generating permutations that could be used, say, as test inputs. If we have a known number of sets of elements, then simple nested loops would work just fine. However, if we don't know ahead of time how many sets we'd like to produce permutations for, then it becomes a bit more challenging to produce permutations. You could write some code to do this recursively, but who really wants to do that.

Coming to the rescue is the Unix Shell (works fine with Cygwin Bash Shell also). Check this out.

echo {a,b,c}{11,22,33}{zyx,wvut,srq}
a11zyx a11wvut a11srq a22zyx a22wvut a22srq a33zyx a33wvut a33srq b11zyx b11wvut b11srq b22zyx b22wvut b22srq b33zyx b33wvut b33srq c11zyx c11wvut c11srq c22zyx c22wvut c22srq c33zyx c33wvut c33srq
Altering the output format to suit your needs is simple as well.

echo \({a,b,c},{1,2,3}\) | sed 's/ /\n/g'


How cool is that? I wish I knew about this handy trick before today.