↓ Twitter is updated more often, so read it! ↓

2010 in review: the year of travel

2010 will go down in my personal history as the year that I travelled. It will only be replaced as such should I travel even more in a subsequent year. Should such happen, I hope that it is of my own free will and benefit.

I spent not at home approximately 23 weeks of the 52 weeks of 2010. Much of that was spent in the Washington, D.C. area for work, while others were spent in Louisville, Houston, at my parents’ (oh, snowmageddon of February 2010), and single overnight stays in Orlando and Phildelphia. Most of this travel occurred in the later seven months of the year, beginning with a trip to DC in June and concluding with some time at my parents’ house for Christmas.

All the travel seriously hampered by ability to get things done. I still managed, though.

Writing

I didn’t write as much for ThinkComputers this year because of the travel, but I did manage to write a good article on travel technology, i.e. the things I take with me when traveling.

Blog-wise, I didn’t write a whole lot. I saw a year-over-year ~7.5% decrease in traffic. I attribute this to my lessened writing and bouncing from topic to topic. Also, my posts from summer 2009 regarding my stock purchases gave me a giant traffic burst I did not replicate this past year. My 2007 article on installing Roundcube Webmail on Ubuntu Feisty continued to be the #1 article on my blog (as it has been since its writing), followed by my 2008 article on using btnx for mouse control in Ubuntu Hardy.

However, I did have a few good articles from 2010. I worked from home a good bit this year, so I wrote some simple rules for working from home as a reminder to myself of “how” to work from home. My geekiest article by far was on addendum on updating the installation whenever there’s a new WordPress release.

In other news, I severed ties with BIOS LEVEL very early in 2010. It was time for me to move on.

Coding

My as-of-yet incomplete magnum opus of 2010 is the Pittco LAN Administration System. PLAS is a LAN party management tool in the vein of Autonomous LAN Party (ALP). Pittsburgh LAN Coalition (Pittco) has wanted to replace ALP with something better for several years now and after a few false starts, we’ve finally got something up and running. It’s still under heavy development and could use some good Ruby on Rails developers (I’m just a newb to RoR). I plan to spent much of my free time in January and February banging on it.

As for open source contributions, there were quite a few! I set up squid-deb-proxy for Ubuntu update bandwidth reduction and speed increases and suggested some default configuration changes in what mirrors are listed and permitting but not caching unspecified domains. I continued to contribute translations to Gwibber, Lernid, and more. I made a tiny patch to bzip2-ruby to fix compilation on Ubuntu Natty. I also fixed some Config -> RbConfig migration problems in gettext for ruby and cucumber, although neither have been accepted upsteam (I tried with cucumber, but couldn’t get the test harness working in the hour or so I wanted to devote to it so I gave up).

I released ttytter-libnotifyperl, a TTYtter extension which uses ayatana notification bubbles in Ubuntu for its notification of Twitter replies, DMs, and such. I don’t know how many people are using it, but I find it indispensable when working on Ubuntu.

Educationally, I learned how to use git in 2010. I avoided it for a few years because I used Subversion (svn) for work and preferred Bazaar (bzr) for home projects, most of which were related to Ubuntu. I still consider myself a newb, but I’ve taught at least one other person how to use git and counseled several others of approximately my experience level. At least I know I’m learning.

One of my larger projects was a for-profit job I took on early in the year. A friend needed a software for running Twitter contests. I doubt the software was ever actually used in production, as the person who was in charge of running the contest left the friend’s company shortly after I finished the product. I may adapt the product and make some kind of a SaaS thing around it if I ever get the time to do it.

My big work project went live at the end of December. I’m not sure what details I’m permitted to tell about it publicly, so ask me in private. I’ll just say that it’s a big public search portal for a government agency. I might update this story or post another entry about it if my superiors permit it.

Profyle.at, the personal profile directory site, kinda died down, but it’s not dead yet. Jon and I hope to revisit it at some point. Work got in the way for both of us, and not getting into Alphalab for the Spring 2010 session didn’t help.

Stocks

I basically slacked off on stocks this year. I made some money from SYMX, but lost a good bit from ONFI and INAR. I finally sold the rest of my holdings in SPNG, the stock which lost me $23,000 in 65 minutes in 2009. After the tax deduction, the rebate combined with my profits from 2009 sales will cause me to lose just under 3% on the whole deal, or around $90. Not too shabby for at one point having ~$30,000 wrapped up in that pump and dump scheme.

Why did I not pay attention as much? For one, @stockgod and the other Bulls on Wall Street crew stopped posting on Twitter as often because BoWS became profitable and it was more profitable for them to share their hints exclusively to BoWS subscribers. I don’t fault them for doing so at all. I didn’t have the time available to make the $75/mo worth it. @stockguy22 is still going strong, as are a few others, but I didn’t have and probably won’t ever regain the spare brain cycles I had in 2009.

I’m not out of the market — I still have ~$10k worth of stocks — but I’m not able to be a daytrader or even a week trader. I’m just sitting long for a while.

Life

Brigette and I are still dating, of course. She will in the coming month release an update to the web site for Glade Mill Sporting and Hound, the show dog kennel she, her sister, and mother operate under. She’s come a long way and just keeps getting better and better every time I see her new designs. I’m eager to see her build a portfolio site before the end of the year!

I think that’s it for this 2010 year in review.

PGH vs PIT: How do YOU abbreviate Pittsburgh?

In a completely unscientific Twitter and Facebook poll last night, I asked the question:

PGH or PIT? How to YOU abbreviate Pittsburgh?

Boring Pittsburgh helped out on Facebook, too. @pghtweetup assisted, as well.

The count is in:

60 PGH
4 PIT
2 YNZ
1 YINZ

Many were quick to point out that PIT is Pittsburgh International Airport’s code, and that PIT generally refers to the airport when used in context.

Others reminded that professional sports broadcasts generally use PIT. This data shows that perhaps those outlets should be using PGH!

Thanks to all who participated! Don’t forget to follow me on Twitter.

Spongetech ($SPNG) executives arrested for securities fraud

It’s all over the stock world today that top executives, accountants, and others related to Spongetech Delivery Systems (SPNG) were arrested by the SEC, charged with securities fraud.

The top executives of Spongetech Delivery Systems Inc. (SPNG) were arrested and charged Wednesday in an alleged scheme to defraud investors by reporting falsely and grossly overstated sales figures.

According to a criminal complaint filed Wednesday, Michael Metter, Spongetech’s chief executive and president, and Steven Moskowitz, the New York pre-soaped sponge maker’s chief operating officer and chief financial officer, were charged with conspiracy to commit securities fraud and obstruction of justice. They each face up to five years in prison on the conspiracy charge.

The article, and others, go on to reveal that SPNG overstated its sales by up to 99%, the percentage of which its sales were to entities which don’t even exist.

SPNG down 83% on news its execs were arrested for securities fraud

SPNG ended the trading day today at .0069, an 83% drop.

I rode SPNG through the pump-and-dump scheme last June (SPNG dropped 27.66% yesterday, or how I learned many lessons about the stock market, Out of SPNG, 7% profit, back in and holding).

I bought back in shortly after and have been holding since. I added a small position in November, bringing my average from .15 to .095. I bought a tiny position today for $75, bringing my average to .08. I somewhat regret this decision, as I probably could have bought and sold more intraday if I had more cash in my account.

Timothy Sykes has a fantastic article on the mess: The Biggest Penny Stock Pump & Dump Ever? Possibly $250+ Million, SEC Alleges SpongeTech Scheme Sold 2.5 Billion Shares, Suckering Sports Fans Everywhere, What Do You Think?

If what the SEC alleges is proven true and SPNG executives did sell 2.5 billion shares, this may go down as the largest penny stock pump and dump in history (the stock rose from under a penny/share to 30 cents/share so you gotta figure an average selling price of 10-20 cents/share would yield $250-$500 million in allegedly illegal profits)…pretty amazing considering SPNG is getting sued by half a dozen sports teams like The NY Mets, NY Islanders, Chicago Bears & NY Giants as The NY Post recently pointed out (nope, they didn’t ask me for my opinion, I am simply linking to a published article FYI) for mere six figures (where did all the money go from these 2.5 billion share sales?)

I, to this day, which that I had listened to @_TheDean when he warned me the morning of June 12 that he thought SPNG was a pump and dump and that I should take my profits (~99%) and run. Considering my goal of stock trading is to risk a little bit of extra, unplanned income to help pay off my student loans, I’d have been more than 2/3 of the way there had I followed his advice (and perhaps that of Sykes).

Live and learn. Risk is risk.

Anyway, worst case scenario is that I lose the couple thousand dollars I have in SPNG and get to perhaps partake in a shareholder lawsuit. Best case scenario? Current execs serve their time and someone else comes in, and takes this .0069 dollar stock to a 1.00 dollar stock in a few years. No matter what, I’m in for the ride. Profits or bust on this one.

Ironically, I just watched Wall Street last night.

SPNG dropped 27.66% yesterday, or how I learned many lessons about the stock market

SPNG 2009-06-12 (Google Finance graph)

Yesterday, Friday, June 12, 2009, was a day that I learned a lot about the perniciousness of the stock market and my own threshold of nervousness and composure.

The stock for Spongetech Delivery Systems (SPNG.OB) opened the day at $0.235, peaking at $0.29 somewhere around 11:45 I acquired Thursday an additional position at $0.2399, but only got half of what I wanted because I had the order on the table since .22 and feared that perhaps my order was too large at that price to be filled. I decided to acquire the remainder at $0.285, but managed to get it at $0.2801 near 10:45. This put my average position at $0.12, as I had nearly approximately 72,000 shares below $0.10.

Near 12:30, a massive sell-off began. The price dropped from approximately $0.285 to $0.26 in just a few minutes. It bounced back up to $0.27 around 12:45, but continued to fall after that. Idiotically, I decided to put another $500 in at $0.24, think that the drop was just a hiccup back to the opening price. Boy, was I wrong!

It nearly immediately spun out of control, dropping fast, sometimes by more than a cent between page refreshes. The ticker went red at approximately 13:15.

SPNG 2009-06-12 (Etrade graph)

When it hit $0.22, I figured it was funny business. I had read some articles posted by @_thedean and some others earlier in the morning which warned of a major pump-and-dump scheme going on, and had set a stop at 20 cents in order to protect my profits, but stupidly and without real reason removed it when I saw the stock hit $0.26. I was unfamiliar with the people who posted these articles, and in my naiveté ignored them.

When SPNG hit $0.18, I knew I was in trouble. I set a stop limit at $0.13/$0.125 so that I wouldn’t go into the red (remember that my average position is $0.12). I hoped it would stop around $0.15, as that had been a level of support days earlier, but it didn’t stop there. $0.13 came and went, and my limit order never executed because the stock was at $0.11 within five minutes. I felt nauseated as a I watched my healthy green profit become a blood red loss.

SPNG dropped ~73% to $0.075 in 65 minutes. It bottomed out around 13:55. My holdings in SPNG lost $23,770 in value in 65 minutes. My nearly 200% gain dropped to a nearly 40% loss in 65 minutes.

I decided against taking any loss, as I couldn’t afford a loss of $12,000. I decided to hold on–chasers would bring the stock back up before the end of the day. Lo and behold, they did. SPNG ended the day down $0.065 at $0.175, a 27.66% loss.

I learned several lessons from this experience.

When you read troubling news, set a stop and stick to it. This was my number one error of the day. Had I adhered to this, I could have preserved profits of my sub-$.20 positions and participated in the massive buy-in which occured during the two hour rebuild of the price. This leads me to the next lesson…

If you think it’s going to tank, sell high, buy low. This is especially true for penny stocks like SPNG. Selling at $0.20 and buying back at $0.10 would have DOUBLED my holdings, and I could have had some excellent profits selling those shares at $0.175 at the end of the day.

Hope is worth nothing on the stock market. Hoping that the price will come out of free fall is like hoping that a disease is going to go away untreated. It might, but more than likely action and/or preparation is better than inaction and/or unpreparedness. Thanks to @travolto and @kosovar for reminding me of this.

Take a profit more often, even when you’re long. I’m a long trader most of the time. I hold for weeks, SPNG is no different. However, I admittedly got greedy as I watched my gains hit 100% then 200%. My initial position was at ~1400% gain at the peak yesterday. Turning ~$400 into ~$5500 is pretty awe-inspiring. However, I should have been taking profit occasionally and buying back on dips. I really should have taken a profit at the major support levels of $0.10, $0.15, $0.20, and $0.25. I may have made even more money had I done that, and I wouldn’t have been hit as hard by this fallout.

Do your own research so that you have only yourself to blame. I do this and have always done this. I rarely accept on faith anything anyone I don’t know personally tells me. I did my own research on the pump-and-dump thing, but fell to my own inexperience. This leads me to my next lesson…

When others warn you about something, listen to them, because they probably know more than you. They might be right; they might be wrong. Nonetheless, when money is involved, caution is paramount. The guys I follow on Twitter and StockTwits certainly know more than I do, but I chose to haphazardly embrace their warnings and I got burned because of my own inexperience.

If you start to go negative on a massive sell-off, it may be wise to hold. I can’t find who said it, but “you never lose until you sell.” Be careful when applying this philosophy, because once a stock hits $0, you’re screwed if you’re still holding.

Use discretion when twittering about stocks; don’t give away your stops. Someone else (@stockguy22?) said this before me. Never give away your stops. That’s private information which someone could very easily use against you. What very well may have happened yesterday is that someone with a lot of shares sold them very low, triggering enough other peoples’ stops that there were a ton of shares available on the market at a very low price. A few people made a lot of money yesterday, and lots of people lost a lot of money or didn’t get the profits they wanted yesterday.

Don’t panic. Set a goal and execute. I should have kept my stop, and when I didn’t, I should have set it higher with the clairvoyance that the stock was going to keep falling. Buying back even a penny lower would have saved some profit somewhere along the line.

What was the cause of this mess? All fingers point to profit taking. Someone on Google Finance’s SPNG board has another theory.

I invite you to check out my Twitter stream while using Nested Twitter Responses to see responses to my inquiries in my panicked state. I’ve included relevant portions below for your enjoyment. Remember that it’s in reverse order, so read bottom->up. Also, ignore the “# hours ago”, it’s valid as of the time I copied the posts from Twitter.

  1. $SPNG hovering around .18 right now. If it closes above .20 after the nearly mortal wounds it took after lunch, I’ll be ecstatic
  2. Well, if nothing else, my stock panic today will make for an excellent blog post over the weekend
  3. @FlyingUrchin Thanks for the headsup. I’m all in on $SPNG right now, steadying my stomach after it dropped 50% at lunch, rebounding now
  4. EVERYTHING IS FINE, NOTHING IS RUINED #FB
  5. @HisRoyalDoognes thanks for the headsup. I’m currently all in $SPNG and hating myself for ignoring warnings of a pump and dump today
  6. @cpruette profit taking. check out @_thedean as well as a few tweets earlier I made. someone called it, I ignored it in my newbosity
  7. @cpruette I wish I had some spare cash to buy it this cheap. Contemplating selling $INAR and $ONFI for a loss and putting the money on $SPNG
  8. I uploaded a YouTube video — Jane’s Addiction – Jane Says – Pittsburgh – 6/10/2009 http://bit.ly/RpeBG
  9. OK…looks like $SPNG is bouncing back up a bit. meetings for the rest of the day. getting my mind off this vomit comet for now
  10. . @travolto so profit taking = folks sell much lower than the stock is currently worth? selling high and buying low on the way down? $SPNG
  11. Folks, I’m hitting losses on $SPNG. Explain to me the newb trader the logic behind selling a stock at 1/3 of what it’s worth and tanking it?
  12. $SPNG my stop loss just triggered. I knew I should have kept it at .20 when I set it earlier today. @_thedean looks like I got burned
  13. . @mikeklass yes. you can hate me for tweeting too much. Gonna be quiet for the rest of the day, though–meetings for eternity
  14. dammit dammit dammit $SPNG is tanking HARD HARD HARD. setting a stop at $1000 profit..will buy back in if it corrects later
  15. crap crap crap crap crap $SPNG just nosedived. “should I stay or should I go now” this company is still sound, I think I’m staying
  16. . @cpruette crap crap crap I just got another position at .2403 and I’m spent on cash…dunno if I can offload others fast enough to get in
  17. uh oh…who sold $SPNG at .26? THIS IS NOT PROGRESS, PEOPLE. I don’t like being down this much on new positions….
  18. @KoSoVaR and I realized that it’s your replies that mess up gwibber. I don’t know why yet, though…
  19. @KoSoVaR negative. I ended up sticking in :-\. I’m out at 50% loss, otherwise I’m staying long.
  20. . @cpruette moreover, I don’t think we’ll see another sub-.30 opening
  21. . @cpruette my trick is that I’m long on $SPNG. I salute the shorts, but I’m in until .55 or greater
  22. . @cpruette I don’t see SPNG slowing down anytime soon. I took a position at .2399 and .281. I should have gone bigger at .2399 :-\
  23. don’t hate me ’cause I’m makin’ money. hate me ’cause you’re too lazy to try it yourself
  24. new $SPNG position drops my sellout price to .55 to cover my student loans. please please please let it happen.
  25. Ugh. I should’ve put the money I put in $SYMX and $ONFI on $SPNG instead
  26. taking another position at 0.285 in $SPNG. I wish I would have done that yesterday at 0.24!
  27. @wallstreet1929 I saw that and retweeted it. I’m watching cautiously.
  28. Excellent article on investing in $SPNG http://is.gd/ZTLT
  29. ♺ @shawnp0wers: In ~4.5 years, the aliens near Alpha Centauri will wonder why they can’t watch I Love Lucy on their analog brain implants…
  30. $SPNG at .61 is my goal. At that price, I can sell and pay off my student loans immediately, saving $300/mo for 20 years, plus $27k interest
  31. $ONFI what the hell? what the hell? what the hell? Probably going to dump it if it hits 50% loss
  32. seriously. who just sold $ONFI for .09? This stock is probably worth .25 if peoples’ analyses are correct.
  33. $SPNG is my hero, but I’m not blinded by the dough it’s making me. Cautiously proceeding, hopefully we’ll see $1 soon
  34. @_TheDean that’s very troubling…I think I might be setting a stop today…
  35. Amagamated life and stock update for June 11, 2009: I’ve been incredibly busy these past six weeks or so s.. http://twurl.nl/gizlub
  36. ♺ @liberty_76: Major PA Legislative Victory Scored! 3 privacy bills passed out of committee
    http://bit.ly/vLb3X
  37. @lionsharevc @marxiey what’s your rationale behind $IVOB?
  38. currently at 179.06% gain on $SPNG on all positions. REALLY kicked myself that I didn’t go all in last Monday at 0.039

With any luck, SPNG will return to .30 and continue to climb. It’s a sound company with sound financials and great products. It might just take longer to hit my target of $0.55. However, I’m proceeding cautiously, and setting my stops along the way.

My new hobby: stock trading


It all started a year or two ago when I decided to buy $250 worth of stock in Transmeta (TMTA), which had recently released a new processor design and licensed some technology to Intel or one of the other major processor manufacturers. A few weeks later, and unbeknownst to me, TMTA performed a reverse split to increase the value of its stock and avoid delisting. The stock price went from $8 to $15 and my shares went from approximately 30 to approximately 16. The bad part is that the stock price kept dropping. It was at $12 when I decided to cut my losses and cash out. I lost approximately $32 on that venture.

I convalesced for a while, nursing my $32 wound (not a lot of money, but a chunk for a college kid). I continued to read; continued to list stocks I wanted to watch in my Google Finance porfolios.

I started again last summer (July?) with 17,000 shares of Linux Gold Corporation (LNXGF), $1,020 worth of 6 cent shares. I noticed that the stock was highly volatile: its intraday range was generally between .06 and .10. I hoped to hit that .10 sweet spot for a nice gain. Unfortunately, that day never came after I bought the stock. It stuck at .06 for days, weeks, months. Sometimes it would hit .07, but that wasn’t enough for me. One day, it hit .08, but I was busy working and didn’t catch the spike.

Eventually, I set a limit sell for .07 for 13,400 shares and .065 for the other 3,600. After commission, I got back approximately $1146, a $126, 12% profit. Not bad for someone who had idiotically lost $32 a few months prior.

I would later learn a lot more about the role of volume, and realize that it may have taken days of .10 to offload my 17,000 shares. I would have been better off farming it for that one penny gain all along: buy low, sell high.

In October 2008, the market crashed on account of several American banks’ and insurance companies’ financial insolvency and the American auto makers’ financial revelations. Stocks which were valued in the high tens were suddenly in the low tens, or even in the ones.

By the end of October, I knew that it was certainly a buyer’s market: a cautious buyer’s market, but for most stocks, the only direction to go was up.

I read up on dividends and decided that I wanted to acquire enough holdings in something that I would see some kind of divided check once a quarter. The amount didn’t really matter; I wanted the majesty of telling my father and grandfather that I made a dividend since they both love to use the phrase “it pays dividends”.

I bought 100 shares of Diana Shipping (DSX), a Greek dry shipping company. This set me back by approximately $800 (8.00/share), but the dividend which it was supposed to be paying in two or three days was .39, so I’d see a check for $39 by the end of the year. Unfortunately, I misunderstood the “holders of record” definition and didn’t get the check: I bought in a day late. I decided to hold onto it, as I knew it could only get better. DSX announced that it was suspending its dividend, though, so I was in the hole $800 and wasn’t going to get that skinny little dividend check.

I did some more research and settled on Euroseas (ESEA), another Greek dry shipping company. I got in at $5.65 knowing that, this time, I would get the dividend. It came—all $17.00 of it—and I rejoiced! I made a dividend! w00t!

Unfortunately, my call about “things only going up” was incorrect when applied to ESEA. As of this writing, it’s at $4.84, but has been growing fairly steadily since hitting a low at $3.51 in January. I got another dividend in March, though, but it was less than $10.

$SBLK broke 3.00 for the second time today and doesn't look l... on Twitpic

My positions as of Apr. 17

Since then, I acquired some cash from various sources and bought into other companies. My favorite and the poster child for my “buyer’s market” theory is Star Bulk Carriers (SBLK), another Greek dry shipper. I got in at $1.30 and again at $2.87. It’s currently at $3.01 and I’m in for the long haul. The company is nearly two years old and had a 55.98% profit margin in 2008, paying an 18 cent dividend plus new shares in December. If the dividend holds, I could see a more than $500 dividend when it’s issued in May or June.

I bought into a few other companies somewhere in there, including Level3 Communications (LVLT — made a 28% profit when sold), Taiwan Semiconductor (TSM — advised to buy by my now-former boss, still holding), and Ford Motor Company (F — made a 60% profit when sold).

Recent acquisitions include Vonage (VG) using profits from the sale of some hard assets and Converted Organics (COIN) using proceeds from the sale of F, at the behest of some reputable folks whom I’ve been following on Twitter. One guy made something like $117,000 last week — 30% profit, if I recall correctly — through JAVA, WYNN, DNDN, and a few others.

VG is poised to take off once a brokerage offloads ~400,000 shares. I’d be happy with a 10%-15% gain based on the amount I have in it. However, the theory is that it will hit .60 from its current .37-.40 range as AT&T (T) shuts down its VoIP phone service and customers flock to more proven providers such as Vonage.

COIN, on the other hand, burned me. I chased it. Kunal called it at .82-.83, but I was hasty and got in at .95 with a hefty chunk of change. I’ll sell it as soon as I can make up the cost of commission or it drops to the point that I’ve lost my profits on F.

Stocktwits is an amazing Twitter mashup which connects amateur investors with seasoned professionals and savvy part-timers. I look forward to getting in on their advice and making a dollar or two along the way. I know I’m still quite green and I don’t have a lot of time during the day to watch for spikes, so indispensable is the guidance of those whose livelihoods depend on their good calls.

Search engines to honor new “canonical” URLs to reduce content duplication

This is hot off the presses, folks.

Google, Yahoo, and Microsoft announced today that their search engines will honor a new value for the rel attribute of link elements commonly found in the head element of a web page. This new specification aims to reduce content duplication via redundant URLs.

For instance, WordPress posts can be accessed always through the URL example.com/index.php?p=3 and often through a URL such as example.com/2009/02/12/search-engines-to-honor-canonical-urls or the like. Search engines see these separate URLs and usually think that they are duplicate content at different URLs, thus reducing the site’s ranking because of the duplicate content.

The new functionality acts not unlike a soft 301 redirect.

Check out the very informational post at Search Engine Land on the new canonical URLs. A big thanks to @badmacktuck for bringing it to my attention!

Joost de Valk wrote a WordPress plugin called wp-canonical which adds such a link element to any WordPress blog. I’m using it now. He’s also written a Drupal plugin and an informative blog about about canonical URLs, too. That was quick!

Esperanto as the brower’s main language

A few days ago, I wrote at work a script which collected information useful to the developers when troubleshooting a customer’s experience on one of our sites. This script checked things such as browser version, operating system, Java existence and version, Flash existence and version, Javascript support, and CSS support. All of this information is either sent via the HTTP request headers or is determinable through interaction with the customer, asking if they can see any No items which should show Yes if the item is installed, enabled, and working.

One item I decided to include for the hell of it was language, through the HTTP request Accept-Language header. Tired of seeing the standard en-us displayed every time I loaded it, I decided to add Esperanto to the fore of the header. I did this by adding it in Firefox’s language options chooser in the Content option panel.

Lo and behold, the language code eo appeared before en-us on my script and I was happy. It was the end of the day, though, so I shutdown shortly thereafter and went home.

The next day, I was startled when the two sites I almost always open first, Google and Meebo, displayed text to me in Esperanto! I had totally forgotten that I had altered my Accept-Language header.

I haven’t changed it back. “Why?” a perplexed reader may ask. I continue to use Esperanto as my main browser language for a few reasons.

  1. Immersion. When a site appears in Esperanto, I’m forced to translate. I don’t let myself change it unless I am in a rush. So far, I have not changed it.
  2. Internationalization. I fancy myself a proponent of software i18n and l10n, so it is educational to me to see how other sites have performed their i18n. I assume that most use either gettext or defines, wherein every string is set in a file with a series of global constants.
  3. Obscurity. It keeps people off of my computer :-)

So, in there interests of determining the penetration of Esperanto as an internationalized and automatically-detected language for the web, I’ve compiled a list of sites which I often visit that have Esperanto strings shown when visiting with a browser which specifies that Esperanto is the preferred language.

  • Google (just search, from what I’ve seen)
  • Meebo (still missing a few strings, though)
  • Twitter (largely untranslated, though)

Some sites surprisingly lacked Esperanto internalization, but it’s not a problem: Esperanto was never meant to be anyone’s first language!

Some readers may be surprised that Wikipedia is omitted from these lists. Wikipedia does not internationalize its main page because all of the languages are listed as a links to the main page (cxefpagxo) of the language’s subdomain itself.

I’m neither surprised nor miffed that there number of sites that do have it are so few. As I stated previously, Esperanto isn’t meant to be anyone’s first language. It’s a quick, intermediary language. I assume that the aforementioned sites with Esperanto internationalization have someone one staff who speaks it fluently, and the translation process for it was effortless.

I hope to integrate i18n into a few projects I’m developing currently. By “hope”, I mean “will.”

HOWTO Update Twitter from the console or GUI

I’ve gone and added to the script, checking for errors and making it more slick.

Check it out at twitter-gx or read the code contained herein.


#!/bin/bash
#@Name: twitter-gx
#@Author: Colin Dean <cad@cad.cx>
#@URL: http://cad.cx/twitter
#CHANGE THESE
EMAIL=you@yours.com
PASSWORD=lolz
#PATHS
ZENITY=/usr/bin/zenity
CURL=/usr/bin/curl
ICON=/usr/share/pixmaps/gnome-irc.png
#can someone suggest a better icon?
#STRINGS--someone want to localize?
WHAT="What are you doing? "
SORRY="Sorry, that was too long."
UPDATED="Tweet submitted:"
FAILED="Tweet failed. Check output for why."

CURL_MISSING="curl was not found at ${CURL}. Please install curl."
ZENITY_MISSING="zenity was not found at ${ZENITY}. Please install zenity."
#-------Woe to those who make changes below unless they know what it does------#

#META
NAME="twitter-gx"
VERSION="1.0"
URL="http://cad.cx/twitter/twitter.xml"
#functions galore
function check_for_deps {

#I'm not going to bother checking for awk. Does any sane distro omit it?
  if [ ! -x ${CURL} ]; then

    CURL=`which curl`
    if [ "$?" = 1 ]; then

      warn_user "${CURL_MISSING}"
      exit 1
    fi
  fi

  if [ ! -x ${ZENITY} ]; then

    ZENITY=`which zenity`
    if [ "$?" = 1 ]; then

      warn_user "${ZENITY_MISSING}"
      exit 1
    fi
  fi

}

function getinput {
  if [ ${TERM} = "xterm" ]; then echo -n "${WHAT}"; read TWEET
    else TWEET=$(${ZENITY} --entry --text="${WHAT}" --entry-text="${1}")

  fi
}

function check_length {
  TWEETLENGTH=$(echo -n "${TWEET}" | wc -m)

  if [ ${TWEETLENGTH} -gt 140 ]; then

    warn_user "${SORRY} (${TWEETLENGTH} > 140)"
    getinput "${TWEET}"

    check_length
  fi
}

function warn_user {
  if [ ${TERM} = "xterm" ]; then echo "${1}"

    else ${ZENITY} --warning --text="${1}"
  fi

}

function urlencode () {
#one day, I will understand awk
#got this from somewhere
  echo "$@" | awk '

  BEGIN {
   # with inspiration from Heiner Steven and Rick Richardson
      split ("1 2 3 4 5 6 7 8 9 A B C D E F", hexit, " ")
      hexit [0] = 0 # setup the hex values we will use..
      for (i = 1 ; i <= 255 ; ++i) ord[ sprintf ("%c", i) "" ] = i + 0

    } {
      encoded = ""
      for (i = 1 ; i <= length ($0) ; ++i) {
        c = substr ($0, i, 1)
        if ( c ~ /[a-zA-Z0-9.-]/ ) { # allow only basic chrs
          encoded = encoded c

        } else { # encode everything else..
          lo = ord[c] % 16
          hi = int (ord[c] / 16);
          encoded = encoded "%" hexit [hi] hexit [lo]
        }

      }
#printf encoded
    }
  END {
    printf ("%s", encoded)
  }

'
}

function submit_tweet {
  OUTFILE="/tmp/twitter_response-`date +%Y%m%d%H%M%S`.txt"

  ${CURL} -s \
       -u ${EMAIL}:${PASSWORD} \
       -o ${OUTFILE} \
       -d status="$(urlencode "${TWEET}")" \
       -H "X-Twitter-Client: ${NAME}" \
       -H "X-Twitter-Client-Version: ${VERSION}" \
       -H "X-Twitter-Client-URL: ${URL}" \
       http://twitter.com/statuses/update.xml

}

function notify_user {
  if [ "${1}" = "success" ]; then

    TERM_MESSAGE="${UPDATED} ${TWEET}"
    GUI_MESSAGE="${UPDATED}\n\n${TWEET}"

    ICON_STR="--window-icon=${ICON}"
  fi
  if [ "${1}" = "failed" ]; then

    TERM_MESSAGE="${FAILED}"
    GUI_MESSAGE="${FAILED}"
    ICON_STR=""

  fi

  if [ ${TERM} = "xterm" ]; then echo "${TERM_MESSAGE}"

    else
      exec 3> >(${ZENITY} --notification --listen ${ICON_STR})

      echo "message: ${GUI_MESSAGE}" >&3
      sleep 10
      exec 3>&-
  fi

}

TWEET=$@ #see if it was supplied on the command line
if [ "${TWEET}" = "-v" ]; then echo "${NAME} ${VERSION}" && exit; fi

check_for_deps
if [ -z "${TWEET}" ]; then getinput; fi #if it wasn't, prompt for it

check_length #make sure it's less than 140 characters
submit_tweet #submit it since we got past the check

if [ "$?" == 0 ]; then notify_user success && exit 0;

else notify_user fail && exit 1; fi


HOWTO Write a script to update Twitter from Linux

I just signed up for Twitter as colindean. I don’t know what use I’ll have for it, as I’m not one who is much for microblogging or partying.

Anyway, the API caught my eye, and after having read Wayne’s post at Fsckin w/ Linux regarding Twitter clients for Linux, I decided to roll my own rather than use what’s out there. I wanted something simple and bashful.


#!/bin/bash
EMAIL=youremail@yourdomain.com
PASSWORD=yourpassword

WHAT="What are you doing? "
SORRY="Sorry, that was too long."
UPDATED="Tweet submitted:"

function getinput {
  if [ ${TERM} = "xterm" ]; then echo -n "${WHAT}"; read TWEET
    else TWEET=$(zenity --entry --text="${WHAT}" --entry-text="${1}")
  fi
}

function check_length {
  TWEETLENGTH=$(echo -n "${TWEET}" | wc -m)
  if [ ${TWEETLENGTH} -gt 140 ]; then
    warn_user
    getinput ${TWEET}
    check_length
  fi
}

function warn_user {
  if [ ${TERM} = "xterm" ]; then echo "${SORRY}"
    else zenity --warning --text="${SORRY}"
  fi
}
function submit_tweet {
  curl -u ${EMAIL}:${PASSWORD} \
       -d status="${TWEET}" \
       http://twitter.com/statuses/update.xml \
  > /dev/null
}

TWEET=$@ #see if it was supplied on the command line
if [ -z "${TWEET}" ]; then getinput; fi #if it wasn't, prompt for it
check_length #make sure it's less than 140 characters
submit_tweet #submit it since we got past the check

if [ ${TERM} = "xterm" ]; then echo "${UPDATED} ${TWEET}"
  else
    exec 3> >(zenity --notification --listen --window-icon=/usr/share/pixmaps/gnome-irc.png)
    echo "message: ${UPDATED}\n\n${TWEET}" >&3
    sleep 10
    exec 3>&-
fi

Just replace the EMAIL and PASSWORD variables and drop it into a directory in your $PATH. You can add it to the panel, too—it will detect if it’s been executed at a terminal or from the panel or other GUI element. It could also very easily be internationalized.

Let me know what you think of this script—it’s 4:00 am and I’m about to pass out.

Sorry, that one line might overflow the box on slim resolutions. I’ll get that fixed one of these days. Update: That was an easy fix. Added overflow: auto; to the codeblock CSS.