Tuesday, February 19, 2008

Experts Exchange - please go fuck-off and die already!

As a programmer, my number one tool for getting out of a tough bind is a quick google search.

Developers are chatty, and we have about a million different forums, blogs, wikis, example sites, source projects, etc. When I'm having a problem with my code, chances are that there have been many other programmers that have already found a solution, and some of them probably posted answers online somewhere.

But, in any given search, you are bound to get at least a few links to this place called "Experts Exchange".

Note: I'm not linking to Experts Exchange... this is deliberate...

Nothing about the text of the google result will stand out as being an Experts Exchange related site... it'll just have a reasonable title and an excerpt that suggests it as a good place to look.

So I click the link.

And then I see the Experts Exchange page.

...  and then I just want to fucking KILL the bastards that run this fucking sham of a site!!!

The idea of Experts Exchange itself isn't so bad. A subscription based community of IT professionals working together to create a database of answers to IT related issues.

No problem in theory...

In practice though, they gimmick the big search engines like Google into returning their pages knowing that those answers are NOT going to be on the page when the user follows the link. This technique is called 'cloaking', and I am annoyed that Google doesn't remove experts exchange from their indexes for such a blatantly deceptive tactic.

The trick is against Google's own guidelines even.

My second problem is that the quality of the actual answers on experts exchange is retardedly bad. Certainly not worth paying a monthly subscription fee.

But what annoys me most is just how much of my time I've wasted having to back-track after falling for yet another worthless experts exchange link. It happens at least two or three times a day... sometimes more.

And it gets old... really old...

If I ever do finally go postal, then I'll be stopping by the offices of Experts Exchange pretty early in the tour...


Saturday, February 2, 2008

FDA - Information Terrorism for Epileptics

Caress (who posted about this too) and I came across this report on CNN yesterday. Since then I've seen it reported at least a dozen other places on TV and around the net.

The FDA has issued an advisory designed to needlessly scare the shit out of epileptics and healthcare professionals treating epileptics.

According to the FDA advisory, epileptic treatment drugs cause people to commit suicide!

Check this shit out:
Data from 199 placebo-controlled clinical studies covering eleven different antiepileptic drugs were reviewed and analyzed for reports of suicidal behavior (completed suicides, suicide attempts and preparatory acts) and suicidal ideation...

The analysis included a total of 43,892 patients ages five and older (27,863 in drug treatment groups and 16,029 in placebo groups).

In the FDA’s analysis, patients receiving antiepileptic drugs had approximately twice the risk of suicidal behavior or ideation (0.43%) compared to patients receiving placebo (0.22%)....

Four of the patients who were taking one of the antiepileptic drugs committed suicide, whereas none of the patients in the placebo group did.
That's right... 0.2% more suicidal behaviors were reported among people taking a brain chemical altering drug to treat a debilitating brain disorder.
Holy shit!

Warn everyone about the pending health apocalypse before its too late!

Epileptics must stop taking their drugs immediately or they might die!!!
I know several epileptics, including my own sister, and one thing I can say for certain is that having epilepsy sucks ass!

In ANY study of epilepsy, it shouldn't surprise anyone to find suicidal behavior to be a real problem.

What surprises me about this particular study is the unbelievably low number of "reported suicidal behavior" incidents overall.  Oddly enough, the number of reported suicidal behaviors in the FDA's study is lower than the National Institute of Mental Health's reported rate of suicidal behaviors in the general population.

That should be a big clue as to just how unreliable the FDA study's conclusion is!

Even with so many subjects being analyzed, a number like 0.2% is beyond ridiculously small...it is irrelevant.

Come-the-fuck-on!

0.2% ?

WTF!?!?

It isn't as if healthcare professionals don't already KNOW that suicidal behavior is something to watch for in epileptics... telling them that treating epileptics with drugs makes them "twice as likely" to commit suicide is just plain irresponsible.

But what pisses me off more than the FDA wasting my tax dollars pointlessly making a big deal out of nothing, is that the major news outlets are also picking it up and presenting it as news.

The news outlets certainly haven't bothered to use common sense in reading the report. Nope... they just see the "twice as likely" part and report that part!

The reason this is such a problem in my opinion is that  one of the worst problems related to epilepsy is that so many epileptics don't take their medication.

Ask any police officer or EMS worker how they feel about epileptics!

They fucking HATE epileptics.

That's because so many of them don't take their meds and end up killing or injuring themselves or someone else. Often untreated epileptics are scraped off the road after a car wrecks... and often others get hurt in the process too.

This really is a BIG problem that doesn't get near enough attention... instead everyone is too busy talking about titty-cancer and buying autism awareness ribbons.

There are lots of reasons epileptics stop taking their drugs, and most of them I can't blame them for. I am pretty sure that if I were epileptic I'd probably consider going off my treatment too.

The medications have side effects that are often worse than the epilepsy itself. Some turn you into a zombie, some make you groggy, some make it hard to concentrate, and some fuck your memory up worse than Alzheimer's.

The medications are also very expensive and many epileptics just can't afford them, especially the better drugs that have fewer side-effects. This problem is made worse due to the limited employment options for epileptics and their resulting lower incomes. And that doesn't get into the fact that many insurances don't cover the drugs for pre-existing conditions like this one.

Some just refuse their meds because they don't want to admit they have epilepsy because it estranges them from friends and family. I've known at least a couple of closet epileptics that refused to even get medical tests because they knew they'd lose their drivers license. I even knew one that drove race-cars and if they got diagnosed they'd get booted out of the race circuit... better to just gamble that you wont have a major seizure when anyone is looking.

But now, thanks to the FDA's crack research team, epileptics have one more reason to refuse their drugs... the false assertion that the drugs will make them kill themselves.

Fucking good job FDA!


Friday, January 25, 2008

iRider - The browser UI that should have been...

I promised to talk more about iRider and why it kicks so much ass compared to "tabbed" browsers...

First, iRider isn't a full blown "browser" exactly. It is just a shell that wraps around IE. It is still the IE engine that does the HTML rendering while iRider replaces the address bar, toolbar, status bar, side-bar, and navigation features. Under the hood pages still load up using IE.

That means that if IE can display the page, so will iRider.

It also means that the plug-ins for IE are available in iRider too. The only thing you might miss are the third-party toolbars (like the google toolbar and similar).


The most striking thing you'll notice about iRider is the side-bar. Instead of using tabs along the top, pages open in the side-bar as you navigate the web.

The sidebar takes up a good bit of horizontal space, but with modern screen resolutions this shouldn't be a problem for many people. If you are using a widescreen monitor (and really... who the fuck isn't?) then you probably have plenty of horizontal space to spare anyway.

The sidebar can have a lot more pages open without crowding than you get with tabs. It also displays much more information about the open pages.  With tabbed browsing, you get less room to show the page titles as you open more and more tabs.

The sidebar contains a thumbnail, progress bar, page title, pin button, and close button for each open page.

You can control how big the items in the sidebar appear... specifically, how big the thumbnail image will be. If you are like me then you don't care about thumbnails, so you can shrink them to make more room for more pages! If you prefer visual cues then you can make the thumbnails big, or even huge.

The side-bar gives you a visual relationships between pages. Pages from the same site are grouped together. As you click links, pages in the same site also indent below the page you came from. This visual navigation history really beats the crap out of the old back button.

That's all cool stuff, but iRider's real strength is in the many more subtle features.

Left-clicking a link opens a new page in the main window. The old page remains in the sidebar so it is easy to get back to it.

Right-clicking opens the link in the sidebar, but leaves the main window where it is. This is similar to the "open in new tab" command in tabbed browsers, but is a lot less annoying. This is called "surf-ahead" in iRider.

How often have you opened several tabs in IE or Firefox, then had trouble figuring out which of the 15 tabs contain the pages you haven't looked at yet?

The sidebar in iRider has an elegant solution to this problem. That progress bar serves two purposes. It tells you if a page has finished loading yet, but then it stays lit up after the page loads until you've looked at the page. You can glance at the sidebar and see instantly which pages you've looked at and which you haven't.

Another set of cool features are the bulk-operations.

If you want to open a bunch of links from a page at the same time? Just drag-highlight the links and right click. ALL of the links in the highlighted part of the page will open at once!

The sidebar has bulk operations too. If you want to close a bunch of pages at the same time (and this will come up often) then you can just click-and-drag over several "X"s at once. All of them will close when you release the mouse button (excluding pinned pages).

The sidebar allows you to "pin" pages too. Clicking the "X" will not close pinned page (which prevents accidents with the drag-click closing of several pages at once). Additionally, pinned pages automatically re-open when you launch iRider. And pinning can be done in bulk with click-and-drag in the same way that the close button can.

iRider also has several neat enhancements to the "favorites" that allow you to do neat stuff too. You can create favorites that open multiple pages all at once. I have an "AtWork" favorite that I use to open about 6 to 10 code reference sites at the same time. I have another one for news sites that will open all of my favorite news outlets in one click.

The ideas in iRider's UI are very well thought out, elegant, and graceful. The iRider developers really understand the idea of how users "surf" multiple pages and sites.

It is depressing that most of iRider's features remain obscure and have gone unnoticed by the major browser makers. The UI in iRider is at least 5 or 6 years old now.  But the best that Firefox, IE, and Safari have managed to give us is crappy-ass "tabbed browsing", which is a clumsy and user-hostile shadow of what iRider offers.


Tuesday, January 15, 2008

OH MY GOD! Someone Put Tabs in My Pants?!

Software is very much like any other business. Sometimes it isn't the best idea that wins in the market. All too often the winner is just the one that happens to get noticed first.

Back when browsers were evolving in the 90's, Netscape was king and they had a head start on that whole interweb thing by several years. By 1995 when the net was getting popular, everyone else playing catch up to Netscape.

The easiest way was to just copy Netscape, change the colors, then make millions selling the resulting knock-off browser.

Netscape was making its millions giving away their browser for free, so there must have been some sort of quantum economics that made this a compelling business plan for everyone else. But a lot of companies entered the browser market and all of them wanted the whole Schrödinger's pie!

The problem was that Netscape's products were total crap even by the modest software engineering standards of the time. Other than being first to market they had little going for themselves.

Among Netscape's many flaws was that it was a Single Document Interface (SDI) design. SDI just means that it can only have one "document" (or web page in this case) open at a time. If you wanted two web pages open you had to open two whole instances of the application.

I always suspected that the SDI nature was just that Netscape's programmers lacked the skills to build a good Multiple Document Interface (MDI). But around the same time frame there was also a bizarre religious movement among programmers. The new doctrine claimed that MDI was bad and that SDI was the way to go.

Its hard to tell if the SDI trend was started by Netscape's success with a high-profile SDI application, or if it was just that Netscape became the misguided poster-child for this really fucking dumb-ass idea...

Through the last half of the 90s, nearly all other browsers were playing copy-the-leader with Netscape and so nearly all were SDI clones of Netscape's design. Eventually Netscape imploded due to a combination of bad products, a bad business plan, and real competition from very experienced software shops. Microsoft got the blame for it all, but in reality Netscape was pretty well doomed from the start. All Microsoft did was speed it up.

The only relevant exception to the SDI browser design was from a little company called "Opera" whose developers realized that people often wanted more than one web page open at the same time... I know... fucking crazy right!

But Opera didn't gain much of a user-base since you had to pay actual money to get the Opera browser back then and everyone knew that paying for a browser was a violation of human rights or something.

So by the start of this decade, Opera was just sitting there being awesome while everyone else was using IE instead.

The whole MDI vs. SDI concept is still hotly debated in the developer community today, but most developers have conceded that some apps lend well to MDI while others should go SDI. And most of them also concede that a web browser is an obvious candidate for an MDI design.

Those Netscape developers managed to get their new owner, AOL/Warner, to continue to pay them. So eventually they managed to write a new browser for the open source Mozilla project. Fortunately, they had also learned how to code better and so Mozilla turned out to be quite a good browser.

But no one really cared much about Mozilla until someone decided to try out that whole MDI thing. The Firefox browser was born and with it the fascination with what we now call "tabbed browsing".

Tabbed browsing is just an MDI design with lipstick. The use of MDI in Firefox was trivial, but it was still refreshing enough to get regular people to notice:


"Oh my god!
Look at this!
You can have more than one page open at a time!
And there is a little tab at the top!
Amazing!
Firefox is better than sliced bread!
M$ sucks!
Open-source rawks!"


Of course MDI wasn't new, tabs weren't new, and Firefox was about as revolutionary as shit-stained underwear...

But Firefox did at least get MDI concepts noticed by the mainstream market at least.

After Firefox, Microsoft and the rest had little choice but to start the copy-the-leader game all over again.

Now they all have tabbed MDI designs.

But what frustrates me is that tabbed browsing is not really all that great an idea compared to other possible approaches. Before Mozilla released Firefox, there was already a much better MDI design in the browser market.

That browser is called IRider. It  might have spurred some real advancement in the browser UIs had it just gotten the attention it deserved.

I'll discuss iRider more in another post...

Monday, January 14, 2008

Why is my phone bill so high?

When you think about the U.S. phone system, you have to be amazed! Copper and fiber wires running all over the country connecting nearly every home and business, plus all the equipment in between that makes the magic happen. Its massive and staggering in both scale and complexity.

All that infrastructure cost a fortune to create, but it must also be enormously expensive to maintain and keep up with too.

So when you think that a phone line only cost between $20 and $30 a month, it really is a pretty sweet price tag.

In contrast, cellular networks must be dirt-ass cheap to both create and operate.

Sure, you have to have lots of towers and connect them all via fiber or copper wire... but that is nothing compared to the sheer scale and fagility of the old system of wires.

Upgrading and maintaining the cell networks has to be far easier than sending technicians out to each individual home every time something needs connecting, breaks, or when construction crews dig up some back-woods line somewhere.

And never forget that once upon a time the phone companies were only able to sell one phone line per household. But cell networks can sell one phone line for each member of each household. So the entire size of their market is much larger than the size of the old phone market.

So why then does my cell plan cost $80 per line?

Sure I have data services, but I had that on my land-line once for only $10 extra and it worked a hell of a lot faster than my cell phone's connection.

My cell phone is portable and more convenient than my land line, but the wireless aspect is what should be saving my phone company an embarassingly large amount of money.

I can call the entire U.S. on my cell phone without paying any extra, but that doesn't cost the carrier significantly more than a local call does either.

So what am I actually getting for all that extra money? The cell phone doesn't do anything I couldn't do with my land line, and much of it the land line did better.

I guess the only reason my cell phone bill is $80 is because customers are willing to pay that much.

Its too bad the artificial barriers to entry are so high in the cell business. If entry wasn't controlled by so much regulation and real competition was allowed into the cell market I wonder how much my phone bill would be now?


Monday, January 7, 2008

Train or Checkpoint?

Caress made the ultimate statement while playing The Darkness for XBOX 360 the other day.
"They really should put a checkpoint at the end of the tunnel!"
 
-- Caress Redd
I agree...  they really should...

Sunday, January 6, 2008

Graffiti Beta 1 - Review (part 2): Performance

I finally ran some simple performance tests on Graffiti Beta 1. By simple I mean that only a stopwatch and web browser were used. The purpose was to get a general "feel" for Graffiti's performance with a large numbers posts in the database.

I ran the test on a Dell Inspiron Laptop (2GHz Core Duo, 2GB Ram, 7200 RPM HDD) running Windows Vista 32bit, IIS 7, and SQL Express 2005.

Since I was using my own development laptop, and it has limited free HDD space, I changed the DB recovery mode to "Simple". No other database tuning was performed.

To generate the data I just created a SQL Schema project in Visual Studio 2008 Team System then created a simple data generation plan. The generated data included 5 categories, 100,000 posts, and 200,000 comments. The posts were split evenly among the 5 categories. Comments were also split evenly among the posts (2 comments to a post). 

Results:
100k posts and 200k comments:
  • Graffiti was able to display the user facing pages with only a minor performance impact.
     
  • The initial load of the site's home page took nearly 5 seconds.
      
  • Refresh of the home page took less than 1 second.
     
  • The initial load of a category page took about 2 seconds, with refreshes being nearly instant.
     
  • Clicking the "older posts" button in any content list took about 4 seconds. Once loaded though, revisiting those pages was nearly instant.
     
  • Loading a content item's view took about 1 second on first load, and was nearly instant thereafter.
     
  • Loading the control panel resulted in a SQL Timeout error every time.
    Looking at the queries in SQL Profiler: It performs a select count against the posts table, probably for use by the summary chart on the dashboard.
      
    Testing the query manually: about 1 minute and 30 seconds to count through the table using the same where and group by clauses. Counting the posts without any where or group clauses still takes around 30 seconds. HDD throughput was at 100% during the entire duration of the query's execution.
     
    This is an area where a full version of SQL server on a dedicated piece of server hardware would make a huge difference. This kind of query bottlenecks on the low throughput of the laptop's hard drive... Low HDD performance is a typical problem on any laptop though.
 50k posts and 100k comments:
  • User facing pages loaded with no noticeable performance problems. Speeds were a little snappier than with 100k posts especially on initial page loads and when using the pager in content lists.
     
  • The admin dashboard page loaded in 17 seconds on the first load, and was nearly instant on subsequent loads. The "posts" tab of the admin section was the slowest, taking about 28 seconds on the initial load, and about 9 seconds on subsequent loads. The "comments" tab of the admin tools was surprisingly snappy, taking only 3 seconds to load initially.  
Conclusion:
Graffiti beta 1, without special optimization, should be able to serve the needs of most realistic sites in it's target market.

Even on a modestly equipped laptop, performance did not significantly degrade until the number of posts exceeds the 50k mark. On real server hardware it would probably be able to handle well over 100,000 posts with little problem for the end users. The admin tools will degrade more significantly than user-facing pages.

Oddly, the number of comments seemed to have little impact on overall performance.

Looking at the queries that had the most significant performance problems, it will be rather trivial for Telligent to either optimize the queries for larger numbers of posts, or provide alternate configurations that trade convenience features (such as daily report generation rather than real-time reporting) for better performance.
Reality Checks:
  • If you actually have anywhere near 100k posts, you probably are not going to be using any off-the-shelf product without significant customization and DB tuning anyway. Keep in mind that it takes 273 posts a day to get to 100k in a single year. Only a large news outlet is likely to generate that quantity of content and most of them would still take a few years to break the 100k mark.
     
    However, 100k comments isn't too terribly unrealistic for a very popular site.
     
  • There is one major difference between this test and a production environment of Graffiti. In a production situation, Graffiti would have created one folder on the file system for each post that was created via the GUI tools.  Within each generated folder would be a generated "default.aspx" file. The main purpose of these files is to give IIS a default document to use since the graffiti URLs don't specify actual page names. Graffiti also stores a little bit of metadata in these files that can help it render the posts faster (it doesn't seem to have trouble rendering the post if these files are absent though).

    I was unable to quickly find a convenient way to mimic how Graffiti generates these folders and files without resorting to writing a custom app of my own... but this is a simple test, so I deemed it not to be worth the effort.

    I personally would not want to deploy Graffiti on a large scale without a way to disable the creation of these files and folders. Strictly speaking, this feature is only necessary on IIS 6, or IIS 7 when using the classic asp.net pipeline. It would not be unreasonable to expect that Graffiti will support the IIS7 integrated pipeline in the future and allow the per-post folders and files feature to be disabled (please!).