Subscribe to our mailing list

* indicates required
Close

Monday, October 20, 2014

Grab Twitter Names from a Web Page

I've been remiss in not posting more often here. Been carried away curating news for my Twitter account. But speaking of which: I want to share a hack with you (please stay with me here even if you're not a coder) for getting a list of Twitter names from a web page. This is a really quick and dirty hack, but also relatively easy. I encourage you, even if you are not a coder, to try this simple experiment. Ready?

First, go to a Twitter window or tab, preferably the one at https://twitter.com/i/notifications.

In Chrome, type Command-Shift-J. (Firefox: Shift-F4.) That will make a console window appear.

Now Copy and Paste the code shown below into the console window.

m = document.body.textContent.match( /@[_a-zA-Z0-9]+/g);
lut={}; 
for (i=0;i<m.length;i++) lut[ m[i] ]=1; // undupe
r=[]; for (k in lut) r.push(k);
r.sort().join('\n');
 
Okay. In Chrome, you execute the code by hitting Enter. In Firefox's Scratchpad you'll need to do Control-L. In either case, executing the code should cause Twitter names (like @kasthomas) to appear in an alphabetized list, inside the console.

Now you can cut and paste those names as desired, to do with as you please.

Note: The code indiscriminately grabs all Twitter names on the page. It doesn't attempt to do anything special like just grab names of people who Retweeted you. (Left as an exercise for the reader.)

I often use this trick to harvest names of people to gang-thank in a Tweet. (On Fridays, I tend to thank a lot of people for using the #FF hashtag on me.)

Try it.

Code explanation: The first line uses a regular expression to match names of the form @letters_or_numbers. The second line creates a lookup table (with the clever name lut). The third line stuffs names into the table. Doing this, in this particular fashion, has the side effect of unduplicating the names.

The fourth line creates an array and stuffs the names into it.

The fifth and final line sorts the array and prints it to the console, one name to a line.

Ain't pretty. Kinda fugly. But it works, right?

Thursday, October 16, 2014

Can Apple Win Back Market Share from Android?

Android has roughly 70% market share in most countries. Apple hovers around 30%. What's the outlook for Apple? Can it hope to make a dent in Android's overdog status? Can it hope to reverse a longstanding trend toward Android dominance?

I think it can, and will, starting early in 2015.

Apple has announced its newest smartphones will ship in 36 more countries by the end of October, and the company is on track to be in 115 countries by the end of the year.

New markets (and rollout dates) for iOS include:
  • October 17: China, India and Monaco
  • October 23: Israel
  • October 24: Czech Republic, French West Indies, Greenland, Malta, Poland, Reunion Island and South Africa
  • October 30: Bahrain and Kuwait
  • October 31: Albania, Bosnia, Croatia, Estonia, Greece, Guam, Hungary, Iceland, Kosovo, Latvia, Lithuania, Macau, Macedonia, Mexico, Moldova, Montenegro, Serbia, South Korea, Romania, Slovakia, Slovenia, Ukraine, and Thailand
Morgan Stanley’s Apple analyst, Katy Huberty, surveyed smartphone buyers in China recently and found a huge jump in purchase intentions for Apple’s iPhones in China, going from 24% a year ago to 50% today. At the same time, Samsung purchase intentions dropped from 30% to 13%, indicating a likely win for Apple in China.

Given the size of the Chinese and Indian markets, and considering the ultra-strong demand for iPhone 6 in China (now said to exceed 20 million pre-orders, according to a report on China's Tencent), it appears Apple could in fact be setting the stage for a major market-share upset over Android.

BCN, a Japanese company that tracks consumer goods, found that 22 of the 25 top selling smartphones for the week of September 22 to 28 were iPhones. So even in Japan (where Apple has seen a drop in market share), it appears Android faces tough competition, with Apple likely gaining back some of the market share it lost in the past year.

Let us also not forget that the race isn't just about market penetration numbers. It's also about profitability. Apple has a lonstanding tradition of kicking the market's ass in profitability. Four years ago, Apple had 7% of the computer market but 35% of the industry's profits. Something like this will happen in smartphones as well. Apple could well end up with 30% of the market but 50% of the profits. That will matter hugely to company performance and investor happiness.

As I write this (10:45 Eastern US, 16 Oct 2014), AAPL stock is $96.02. This is a bargain price, IMHO. I would be a strong buyer at this level.

Tuesday, October 07, 2014

Adobe, Amazon, and the Great "Spying" Scandal

Alarmist stories at Gigaom, Arstechnica, and elsewhere have recently villainized Adobe Systems for collecting e-book analytics (in unencrypted form) from readers, surreptitiously. "Adobe is Spying on Users, Collecting Data on Their eBook Libraries," a headline from http://the-digital-reader.com blares. Arstechnica is shocked, shocked that people's reading habits are being monitored. And the data's being sent over the wire unencrypted! OH MY GOD!

Give me a freakin' break.

Let's get something straight. Amazon "steals" your reading stats every time you read an e-book. So does Apple. (See the WSJ story "Your Ebook Is Reading You.") Oh, and by the way, who do you think owns Goodreads (which knows a lot about your reading habits)? Amazon, that's who.

Google processes your Gmail to uncover keywords that help it put customized Amazon ads in your face every day. Somehow that's not news, but the fact that Adobe slurps e-book analytics from users of Adobe Digital Editions is treated as if it's the scandal of the century.

Analytics is a big (and I mean BIG) part of what Adobe does now. Do you remember when Adobe acquired Omniture in 2009 for $1.8 billion? What do you suppose that was all about?

It was about analytics, that's what.

Some of the largest web properties in the world run on top of Adobe's Experience Management suite. The latter ties world-class content management to world-class analytics solutions.

Read up on Adobe's SiteCatalyst here.

Arstechnica, by the way, is a Conde Nast property, and Conde Nast is a bigtime Adobe customer. So for Arstechnica to run a sensationalistic screed saying Adobe is stealing people's private reading data is a bit silly. Every time you visit Arstechnica's site, every detail of your visit is captured, rest assured.

Folks, everything you do online is captured, measured, stored, analyzed, by someone, somewhere. Sure, Amazon knows how fast a reader you are, what you like to read, what you finish and don't finish reading, etc. Apple knows this stuff too. Adobe too.

That world we used to live in where no one knew this stuff about you? That world before web analytics? The world of paper-and-ink books that could be read in private? That world is pretty much gone with the wind. Unless you do, in fact, still mostly read paper books. (As I do.)

Let's drop the hysterics about Adobe "spying on readers." Everyone with a web connection is being "spied on" (if that's what you want to call it) nonstop, all the time.

If you don't like it, write your Congressperson. Start a petition. Unplug from the Internet.

But don't heap scorn on Adobe. That's just plain immature.

Disclosure: I used to work for Adobe Systems. I do not work for them, in any capacity, today. These are my opinions. They come solely from me. No one handed them to me. Got it?

Wednesday, October 01, 2014

And Now for a Bit of Perspective


A little perspective can be a good thing, so the next time you feel a need to have your mind blown, just watch this short video and you're sure to come away with a "perspective reset."

Some additional perspective: On a clear night, using only your naked eye, you can see about 5,000 stars, and the furthest of them is around 21,000 light-years away, but most are much closer. The most distant object visible (barely!) with the naked eye is the Andromeda galaxy, 2.5 million light-years distant. Everything else you see at night is "only" a few thousand light-years away.

If you were to travel from the Milky Way to Andromeda, it's possible that most of your trip would occur in total blackness; you would almost certainly traverse areas of space where no stars are visible to the naked eye (because of sheer distance).  You'd look out the space ship's window and see nothing at all (unless you used a telescope).

More perspective: If you were to shrink the solar system down to where the earth is a foot away from the sun, the nearest star would be 50 miles away. But if you were to shrink the Milky Way galaxy down to a foot in diameter, the nearest galaxy is only 25 feet away.

I know. Hard to imagine.

Sci-fi authors: Take note!

Monday, September 29, 2014

Don't Just Mind the Gap, Trade It

I don't often write about investing tips, but this morning's market action was such a classic example of a money-making situation, I feel obliged to share what I (think I) know.

Many investors know about the principle of "trading the gap." The scenario: A stock (or the entire market) gaps lower on the open, which of course simply means the opening price was lower than the previous session's closing price. Instead of continuing to go down (which sometimes happens), the stock immediately begins to trend higher.

When a stock gaps lower on the open (red arrow), it often fills the gap in the next hour.

This morning, the market indices were sharply lower on the open, but immediately began heading higher. This is a classic gap-trading opportunity, particularly if you pick stocks whose behavior you know well, and that have recently been trending higher, with no fundamental reason to go lower. Today's examples: AAPL, AMZN, YHOO. All gapped low on the open, then went higher.

The gap-trading philosophy says: When a stock gaps low on the open, then moves up, it will keep moving up until the gap is "filled" or "covered" (reaching the level indicated by the dotted horizontal line in the above graphic). No one knows why gap-filling occurs, but the fact is, it occurs often enough that you should consider "trading the gap."

I bought AAPL and AMZN call options about 30 miutes after the market opened. They went up smartly. Now because I don't have $25K in my account, I can't sell those contracts in the same session without triggering a day-trader warning. What do you do if your call-option contracts go up and you want to get out (but can't, without triggering a warning)? Buy corresponding puts. You'll lock in the profit until you can get out (and maybe make a little on the put, if the stock opens lower the next day).

I made a little money on AMZN call options on Friday. To lock in the profit, I bought corresponding puts. When the market gapped low (WAY low) this morning, I was delighted. My puts had gone in-the-money. I liquidated them and rode the calls back up again.

For the record: I consider AAPL a good buy in the $97-98 range and I think Amazon will be at $340 sometime within the next two months. Yahoo is severely undervalued at $40.

I am not an investment advisor and this is not professional advice. Seek the advice of a professional before making any investment decisions.

Thursday, September 25, 2014

What Young People Don't Know

Young people today don't realize what has happened to the U.S. economy over the past 40 years. Their sense of what's "normal" is shaped by current reality, not the reality their parents grew up in. They don't know how things were; how prosperous America used to be.

When I think back on what my life was like in 1980, it horrifies me to see how badly the economic environment has deteriorated since then. Let me put try to put it in concrete terms.

The value of the dollar over time. In this graph, 2012 equals 1.
In 1900, a dollar was 29 times as powerful as in 2012.
Four years out of college, I was making $25,000 a year (in 1980). Which doesn't sound like a lot of money, right? Well, consider how I was living at the time. I had bought a nearly new (three years old) two-bedroom house on two acres of wooded land in North Carolina, for $30,000. I bought a new Chevy truck for $4100. I owned a 9-year-old Cessna 182, which I'd bought from a Delta pilot for $16,500. I was easily able to make the monthly payments on all these items. The combined payments came to a little over $600 a month.

Today, the new Chevy truck would cost $25,000. The average home price in the North Carolina town I lived in is now $300,000. A nine-year-old Cessna 182 can be had for $189,000. Basically, everything costs 6 to 10 times more now.

To live the same lifestyle today that I lived in 1980, four years out of college, would require an income of at least $200,000 in 2014 dollars. Few recent grads make anywhere near that amount.

Life was good in America in 1980. It was really easy to live really well on not much money.

What can I say?

Things have changed.

Tuesday, September 23, 2014

Don't Grinf*ck Me

You've seen the scenario play itself out a million times before. A client or coworker comes to you for advice; you offer your very best insights. The other person nods, smiles, thanks you, and agrees to put some of your ideas into action. But then you find out, hours or days later, the person not only ignored your advice but went against it.

You've been grinf#(ked.

The Urban Dictionary defines grinf*ck (noun form) as follows.
In business, when someone smiles and shakes your hand, assuring you that they have heard and will act upon your recommendation or concerns, when in truth you have already been ignored and dismissed.
I think the expectation of being grinf#(ked is why many of us are hesitant to take user satisfaction surveys when asked to do so by banks, e-commerce sites, etc. We suspect we'll get the nod, the sincere thank you—and see our suggestions ignored. (Have you ever dialed the 800 number listed under one of those "How is my driving?" stickers on the backs of trucks? Me neither.)

I'm not a psychologist (so if any specialists are reading this, please speak up here), but it seems to me that grinf**kery, in at least some cases, qualifies as a type of passive-aggressive behavior, meant to humble the advice-giver while bolstering the other person's authority. In other cases, grinf**king is just a byproduct of someone's opinion-gathering requirement. The person who asked for your advice was required to get a second or third opinion on something; there was never any intent to use that opinion to deviate from an already chosen agenda.

And then there are those who mean you no disrespect, but who simply feel embarrassed or timid about disagreeing with you to your face. These are well-meaning people who aren't trying to be disingenuous. They just don't like to appear disagreeable. Or maybe they're confrontation-averse.

Regardless of motivations, it seems to me we all have a duty to be honest and forthright in our dealings with clients and coworkers. We can always agree to disagree on things, if need be. There's room (or should be, in any organization) for honest divergence of opinions. Transparent, open debate of ideas is healthy and should be encouraged.

But don't be disingenuous. Don't camouflage dissent as agreement. Don't tell me one thing when you mean another. Don't deliberately mislead me into thinking you value what I'm saying, when in fact you intend to ignore what I'm saying. When I learn the truth, later, it does nothing good for our relationship.

Just be honest with me. Let me know what you really think. I can take it. I promise.

Don't be a grinf#(ker.