Saturday, January 11, 2014

Manually Invoking TRIM To Restore SSD Performance

I've had my SSD for almost two years now and although Intel's SSD utility shows it as having plenty of life remaining, I'd been reading up on TRIM and the details of how SSDs manage their space.

TRIM is a kind of garbage collection for SSDs, for although SSDs don't experience data fragmentation of the sort that hard drives do, there is clutter which can accumulate over time and negatively affect performance.

I found a forum post on "refreshing" SSD performance which mentioned a tiny utility called ForceTrim, which tells your SSD to perform TRIM processing and smooth out the "wrinkles" in its data storage.



Using CrystalDiskMark to benchmark my SSD performance before running ForceTrim, I saw performance close to what it was when I first started using this SSD as my operating system drive:

BEFORE - Seems pretty close to new SSD performance.


I then opened ForceTrim, selected my C: drive, and clicked TRIM. As the tool advised, I waited around five minutes for the drive to "recover", then reran the benchmark:

AFTER - Modest gains pretty much across the board.

It does appear that manually invoking TRIM can provide a modest boost in read and write performance for an SSD. Perhaps in the SSD age, forcing TRIM once in a while is the "new" defrag?



Monday, January 6, 2014

Happy Bird


Friday, December 27, 2013

LinkButton OnClick Not Firing After OnClientClick

I worked around an oddball problem where the OnClick event of an ASP LinkButton would not fire following execution of some JavaScript tied to its OnClientClick.

The intent is to enable a row in a Telerik RadGrid to be removed by clicking the corresponding button in the row, and more specifically have a modal confirmation dialog appear to prompt the user to confirm their choice.

Here's markup for the GridTemplateColumn containing the button:
<telerik:GridTemplateColumn HeaderText="Remove" UniqueName="Remove" 
  FilterControlWidth="20">
    <ItemTemplate>
        <div style="cursor: hand;">
            <asp:LinkButton runat="server" ID="_RemoveItem" 
                Name="_RemoveItem" Text=" X " Font-Underline="False" 
                ForeColor="DarkBlue" 
                OnClientClick="confirmAspButton(this, 'Are you sure?'); return false;"
                OnClick="RemoveItemButtonClick" 
                style="font-weight:bold;color:red;">
            </asp:LinkButton>
        </div>
    </ItemTemplate>
    <HeaderStyle Width="55"></HeaderStyle>
</telerik:GridTemplateColumn>

The confirmAspButton function is a little JavaScript which is bound to the OnClientClick method of the LinkButton. If the user clicks OK, the confirmation passes and a postback will occur to execute the code beneath the OnClick method, whereas if they click Cancel the dialog will simply disappear.
     function confirmAspButton(button, message) 
     {
          function aspButtonCallbackFn(arg) 
          {
             if (arg) 
             {
                  window.__doPostBack(button.name, "");
             }
          }
            
          window.radconfirm(message, aspButtonCallbackFn, 330, 120, null, "Confirm");
     }


Seems simple enough, yet for some odd reason, in Internet Explorer 10, the LinkButton brought up the dialog just fine, and although the Cancel button click performed as expected, clicking OK had the same effect as cancel and merely cleared the dialog without executing the underlying code.

I managed to find a workaround via StackOverflow which suggests using a Button rather than a LinkButton. Sure enough, this did the trick, for whatever oddball reason whose particulars I could care less to dive into...




Thursday, December 26, 2013

Morgan Fremen


Friday, November 8, 2013

Ramp Art

Creating this gave me a woody!




Tuesday, October 1, 2013

Repost!

Occasionally I post links to various content on Reddit. Often, a diligent member of the internet's police force informs me that somehow a given image or link has *gasp* already been posted somewhere else on the internet.


"Repost!"

O NOES! Holy Jar Jar Binks' prolapsed rectum, internet police! 

What many who post this don't seem to realize is that a) their message is pointless, and b) Reddit's popularity is all about the pageviews

Reddit lives for pageviews. Billions of them, and of those millions are by unique visitors. Some of those visitors are smart, some aren't, and a few are dumb as a sack of hammers. That said, if Reddit were something like a think tank (which it isn't) or a Wikipedia-like foundation (nope) instead of a for-profit company, a self-proclaimed “part-sibling-once-removed” of Condé Nast, Inc., it might do things smarter than it does now.



Putting aside respect for the massive popularity of Reddit and the hard work its staff and board and communities provide, Reddit the site isn't that bright when it comes to sniffing out content that's already been posted. 


There is the somewhat anemic search functionality, which conscientious users occasionally invoke to perform keyword searches in search of existing content, and there are third-party sites like KarmaDecay which provide reverse image search capability for specific subreddits or site-wide. However, note that there is no smart search capability exposed to the users which is savvy to detect whether a given link ultimate leads to something that's been posted before.

Granted, they are in the red. Running a site as popular as Reddit is a huge undertaking, and the infrastructure required to support it increases with its popularity. Even if such smart search were a high priority, investing in its development would bleed resources from their daily operations. 

If anything, users of Reddit who cry "repost" should realize that they're doing more to hurt the site than they are to help it. Comments on Reddit can be upvoted and downvoted, which requires processing power and bandwidth. The loading and rendering those comments also takes power. Worse than the fact that telling someone they've reposted something adds nothing of substance to a discussion about the content in question, it's wasting Reddit's resources.

If content is worthy of being reposted, it often generates some constructive discussion, particularly to those for whom it's a novel find that have never, ever, seen it before. Engaging good content rather than whining about that already seen seems far more worthy of Reddit's dedication to community than its users chiding submitters of content one word at a time.



tl;dr: Repost police, get over yourselves and do something useful for a change.



Wednesday, July 10, 2013

Ender's Game

Orson Scott Card sure is a classy guy.

Long known for his staunch advocacy against homosexuality and outright disrespect of homosexual people, and just in time for the upcoming film adaptation of his popular novel, Ender's Game, he makes a curiously timely plea to the movie-going public to put aside his views, stating in a statement to magazine Entertainment Weekly, "The gay marriage issue is moot."

How quaint, and convenient! Personally I dislike lining the coffers of such people with my dollars, however groundbreaking their works are. 

Someday, all knowledge and the fruits of people's creativity may be free. No longer will talented writers, actors, musicians, or others have to take on multiple minimum-wage jobs to make ends meet while they struggle on the side to achieve their dreams and pursue their passions. 

Instead, everyone will have their basic needs provided for so that, as Maslow indicates in his hierarchy of needs, people will be able to self-actualize and actually live rather than spend much of their daily life worrying about paying the bills, or their very survival. Not now, not in decades, perhaps not in millenia, but someday... hopefully!

I think a good first step toward such an audacious way of life is to share information.

Here, for example is a freely available set of ebooks in PDF format of the Ender's saga, which can be read online or downloaded. I encourage anyone interested in this fine piece of literature to obtain it at their leisure, without having to pay for it, and with the satisfaction that no royalties whatsoever will make it into Orson Scott Card's quite intolerant little hands.



Saturday, June 29, 2013

Dell Vostro 200 Fan Noise

The Dell Vostro 200 in its mini tower/desktop case is a decent computer with just one exception.

NOISE.

When powered on, the fans shoot up to their maximum RPM for a second or so, then slow down. Depending on what you're doing the fan noise is anything from the level of relatively benign white noise to a constant or fluctuating jet engine like drone. Scanning for malware, playing a graphics-intensive game, defragmenting the hard drive, anything with lots of CPU activity prompts the Vostro 200's fans to go full speed.

I found a simple solution to this dilemma. Inside the case there are two 80mm fans for cooling the CPU. One is mounted directly atop the CPU heatsink, and the other is mounted vertically in a bracket along the right-hand side of the computer to push air out ventilation holes in the case.



I had a nice, quiet, 120mm NZXT "performance" fan lying around and decided to use it instead of the two 80mm turbofans that came with the system. 

The CPU fan atop the heatsink is clipped on with several plastic clips, I simply removed each of these with pliers and discarded them since they'd just be in the way of the wider 120mm fan. The exhaust fan alongside is screwed to the case, so I removed it likewise and discarded it.

I then removed the vast amounts of dust and dog hair that had accumulated beneath the fan. As the case is lying horizontal to the desk, I decided to loop some narrow zip ties through the fan's screw holes and through holes in the rear grille of the case. I secured the ties with enough tension to keep the fan hovering just above the plastic and metal of the heatsink assembly.

It's a mystery why Dell chose seemingly the loudest fans possible for this computer. Or, perhaps it isn't so mysterious, perhaps loudness happens to be an unfortunate side effect of cheap hardware. Or, perhaps they wanted to make it seem especially sleek and high tech by having it mimic a 747 taking off. 

Regardless, now the new 120mm fan runs at a quiet, constant speed, and keeps CPU temperatures well within normal limits, with no fear of liftoff.