MacBook, defective by design banner

title:
Put the knife down and take a green herb, dude.


descrip:

One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com

Using 89% of the same design the blog had in 2001.

FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white.
x

MarkUpDown is the best Markdown editor for professionals on Windows 10.

It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support.

Features you won't find anywhere else include...

You've wasted more than $15 of your time looking for a great Markdown editor.

Stop looking. MarkUpDown is the app you're looking for.

Learn more or head over to the 'Store now!

Saturday, December 22, 2012

c# - Automatically update version number - Stack Overflow:

Version v = Assembly.GetExecutingAssembly().GetName().Version;
string About = string.Format(CultureInfo.InvariantCulture, @"YourApp Version {0}.{1}.{2} (r{3})", v.Major, v.Minor, v.Build, v.Revision);

I don't want to be too, "Back in my day," but in VB6 this was a lot more straightforward and useful.

Labels: , ,


posted by ruffin at 12/22/2012 04:12:00 PM
0 comments
Thursday, December 20, 2012

Not by me, yet, though I finished Zoo City a day or two ago.  Instead, I'm going to paste some jive in here from Amazon's Editorial Reviews section on each as I decide which I want to read.

Stranger Things Happen

From Publishers Weekly
The 11 fantasies in this first collection from rising star Link are so quirky and exuberantly imagined that one is easily distracted from their surprisingly serious underpinnings of private pain and emotional estrangement. In "Water Off a Black Dog's Back," a na‹ve young man who has never known personal loss finds that the only way he can curry favor with his lover's physically afflicted family is to suffer a bizarre amputation. The protagonist in "Travels with the Snow Queen" reconsiders her fairy-tale romance when she deconstructs the clich‚s of traditional fairy tales and realizes that their heroines inevitably sacrifice and suffer much more than their heroes do. Link favors impersonal and potentially off-putting postmodern narrative approaches, but draws readers to the emotional core of her stories through vulnerable but brave characters who cope gamely with all the strangeness the world can throw their way. In the book's most effective tale, "Vanishing Act," a young girl's efforts to magically reunite herself with her distant family by withdrawing from the world around her poignantly calls attention to the spiritual vacancies and absence of affection in the family she stays with. "The Specialist's Hat" features twin sisters whose morbid obsessions seems due as much to their father's parental neglect as their mother's death. Although a few of the selections seem little more than awkward freshman exercises in the absurd, the best shed a warm, weird light on their worlds, illuminating fresh perspectives and fantastic possibilities.
Copyright 2001 Cahners Business Information, Inc.

Pump Six and Other Stories 

From Publishers Weekly
Starred Review. Bacigalupi's stellar first collection of 10 stories displays the astute social commentary and consciousness-altering power of the very best short form science fiction. The Hugo-nominated The Calorie Man explores a post–fossil fuel future where genetically modified crops both feed and power the world, and greedy megacorporations hold the fates of millions in their hands. The People of Sand and Slag envisions a future Earth as a contaminated wasteland inhabited by virtually indestructible post-humans who consume stone and swim in petroleum oceans. The Tamarisk Hunter deals with the effects of global warming on water rights in the Southwest, while the title story, original to this volume, follows a New York sewage treatment worker who struggles to repair his antiquated equipment as the city's inhabitants succumb to the brain-damaging effects of industrial pollutants. Deeply thought provoking, Bacigalupi's collected visions of the future are equal parts cautionary tale, social and political commentary and poignantly poetic, revelatory prose. (Apr.) 

Magic for Beginners

From The New YorkerLink's second collection has a McSweeney's-like tendency to digress, but does so without irony. Whether describing witches filled with ants that carry pieces of time, or an orange-juice-colored corduroy couch that looks as if it "has just escaped from a maximum security prison for criminally insane furniture," these stories examine American middle- and lower-middle-class life from unexpected angles that mix fairy tale, science fiction, and zaniness. In Link's worlds, a village takes refuge in a magical handbag, and a convenience store serves zombies as an experiment in retail. Two stories with zombies is perhaps too many, though the first effectively marries humor and horror. Reading Link, one has a sense that sometimes a person needs to wander off for a better perspective, and sometimes a person simply needs to wander off.
Copyright © 2005 The New Yorker --This text refers to an out of print or unavailable edition of this title.



Invasion: Book One of the Secret World Chronicle 

Not so much on this one.  Reader review:

22 of 30 people found the following review helpful


4.0 out of 5 stars Nazi Invaders February 23, 2011By Arthur W. JordinFormat:HardcoverInvasion (2011) is the first SF novel in the Secret World Chronicles series. In an alternate timeline, metahumans began to appear during World War II. These people discovered various psion powers within themselves. They could fly, withstand bullets, read minds and had other attributes. Most were stronger than normals and healed faster.

Might have to skip that one.


Okay, Zoo City has great world building, but the secondary character development was almost non-existent with an ending that nearly puts the book into "wish I hadn't wasted my time reading it" land.  So much potential and a pretty readable tale up until 80% or more of the way in, but devolves into a "Lookit my word count; I gotta finish this now" gore and a Princess Bunhead "I escaped somehow" wrap-up.

There's also Cory Doctorow's Pirate Cinema, but after reading some of For the Win, which started okay but turned into trash, I'm loath to give it a try.

Labels: ,


posted by ruffin at 12/20/2012 01:24:00 PM
0 comments
Wednesday, December 19, 2012

FOSS Patents: The most important Apple-Samsung decision left for Judge Koh: running royalties, not past damages:

The cost to Samsung would, however, not be limited to whatever the court determines it has to pay Apple on a per-unit basis. There would also be the cost of having to maintain two different code trees (one for the U.S. and one for countries in which Apple has won or may win injunctions) for different jurisdictions.

Labels: ,


posted by ruffin at 12/19/2012 12:07:00 PM
0 comments
Tuesday, December 18, 2012

Web Reflection: JSLint: The Bad Part:

In few words, as I have said already before, null is == only with null and undefined, which means we can avoid completely redundant code such:

// Mr D way
if (v !== null && v !== undefined) {
    // v is not null neither undefined
}

// thanks JavaScript
if (v != null) {
    // v is not null neither undefined
}

I think that's a fair critique, if accurate.  It's an interesting trip through JSLint quibbles.

Ultimately, I guess I'm finally on the side of, "Nobody should care if I don't use it while I'm developing, and I shouldn't care if I'm made to use it (or other lint my code) once I'm done."  JSLinting is a fairly painless process, and if nothing else, at least it removes meaningless discussion over coding convention preferences.  I mean, this guy covers everything, it seems.

Does minified JS pass JSLint?

Labels: ,


posted by ruffin at 12/18/2012 02:54:00 PM
0 comments
Sunday, December 16, 2012

MySQL Lists: mysql: Re: GUID storage:

UNHEX(REPLACE(uuid, '-', ''))

will convert uuid to 16-byte string
There's no easy way to do a reverse conversion yet. HEX() will do, but
you'll lose dashes.

Note to self.

Edit: Possibly better.

Labels: ,


posted by ruffin at 12/16/2012 10:44:00 AM
0 comments
Friday, December 14, 2012

How To Get The Dual Link DVI Adapter and a MacBook Pro To Work Together:
We use his adapter with my MacBook Air. Works perfectly. Now, he’s really pissed.
We get in the car, go to the apple store and talk to the folks there. After a bit of mucking around, they came up with a simple solution, which fixed the issue:
Go to System Preferences
    Open Energy Saver
    Select Higher Performance
    Enjoy the use of your adapter and monitor.

I've seen lots of complaints about dual link dvi outputs not work with Macs, which stinks. I'd like to bag the Auria EQ276W at Microcenter, which is essentially (afaict) the equivalent of the "eBay Korean monitors" that put out 2560x1440. It's a sort of poor man's Apple Thunderbolt Display, and my way of stopping myself from buying a 13" Retina MacBook, which, honestly, is pretty hard not to buy.

If I had a second more free time a month, I'd probably bite, but I haven't done enough programming on my home MacBook (maybe 5-7 hours or so a week) to really get aggravated at the lack of real estate. And it's been just long enough since the 13" RMBP was released that I should probably wait for the next cycle anyhow.

Although wow, even that monitor is still south of the 13"'s 2560x1600 and 15"'s 2880x1800. Sheesh.

Labels: ,


posted by ruffin at 12/14/2012 07:07:00 PM
0 comments
Wednesday, December 12, 2012

Fundamentals: Best MVC Practices | The Definitive Guide to Yii | Yii Framework:

Although Model-View-Controller (MVC) is known by nearly every Web developer, how to properly use MVC in real application development still eludes many people. The central idea behind MVC is code reusability and separation of concerns. In this section, we describe some general guidelines on how to better follow MVC when developing a Yii application.

This is application specific, but is one of the better explanations of MVC I've seen in a while.  Too often I see MVC described in a way that's clearly on 3-tiered development.  Or I see people say one's a software pattern and the other an architectural pattern, as if the answer to the question is in another question.  That's crap.

I still don't see how you make a web UI where you don't combine stereotypical Model functionality with Controller functionality without really getting anal about how you split your files, but maybe that's okay/intended.  ??

EDIT: You know, I don't do a horrible job figuring out MVC myself using Burbeck back in May.

Labels: ,


posted by ruffin at 12/12/2012 09:48:00 AM
0 comments
Tuesday, December 11, 2012

Dragging, dropping, and sorting with observableArrays - Knock Me Out:

Allowing items to be dropped between arrays

The next feature that I wanted to support was allowing an item to be dropped between multiple arrays. The logic necessary to make this happen is quite similar, but we need to know a little more information when an element is dropped. We need to know the data item, the item’s original parent array, and the item’s new array.

Purely a note to self.  I'm not the biggest knockoutjs fan.  It seems to encourage "foreach-ly verbose" mental modeling and TONS of behind the scenes overhead when used carelessly.  And handling jQuery/UI<>knockoutjs interactions essentially have you write enough of a translation layer that it feels like you're rewriting jQuery/UI.  You're kludging the two instead of doing it the right way with one.  Very VB6 Wizardy, where it'd bind to a datasource and make a really crappily bound form with |<, <, >, & >| buttons on it, allowing folks who couldn't spell VB to write 70% of what you needed in 10 minutes, making nontechnical pointy heads believe your task was almost done when all you really had was a programmer who had no idea what was going on.  Though admittedly that turned into a rant rather than a fair description of knockoutjs.  ;^)  But they're similar past a certain point.

Knockout is more like playing Guitar Hero, where if you get good enough at the game, you would've been better off spending that time learning to play at least the bass guitar and had a real skill.  If you get to be great at knockoutjs, you're great at knockoutjs.  Doesn't make you a great js coder if Guitar Hero isn't in front of you.  Learn to play the bass instead.  But maybe I'm still missing something here.

Labels: , , ,


posted by ruffin at 12/11/2012 09:19:00 AM
0 comments
Monday, December 10, 2012

Principles of Writing Consistent, Idiomatic JavaScript:

All code in any code-base should look like a single person typed it, no matter how many people contributed.

Though I'm exceptionally guilty of trying my darnedest to revamp coding practices, in theory I can't argue with that at all.  Note to self: Return and look through.  JSLint is one way to move in this direction, but there are plenty of cultural choices even Crockford can't reach [programmatically].

Labels: , ,


posted by ruffin at 12/10/2012 12:55:00 PM
0 comments

Chapter�5.�Questions and Answers:
5.2. Why did I release it under GPL?

I'm using GPL programs for a very long time now and learned very much by having a look at many of the sources. Hence this is my "Thank You" to all programmers that also did so or will do the same.

Man, tell you what, kdiff3 is good.  I'd started using it at the end of my last job with git, and have been using it a few days now with TFS and Visual Studio.  I'm nearly hooked.

The only squabble I have is that I can't figure out how to manually make edits during a 3-way merge without hitting ctrl-v first.  But if I ctrl-v anything, even an empty string, I can start typing.

I think I followed these instructions to set kdiff3 up with TFS & Visual Studio.  I've got issues with the interface in three-way merge tools in general, but if you ignore that for now, kdiff3 is perfect.  And F/free too.

Labels: , , ,


posted by ruffin at 12/10/2012 12:49:00 PM
0 comments
Friday, December 07, 2012

Searching and Navigating Code in VS 2010 (VS 2010 and .NET 4.0 Series) - ScottGu's Blog:

VS 2010 introduces a new “View Call Hierarchy” feature that allows you to quickly discover where a particular method or property within your code-base is being called from, and allows you to quickly traverse the call tree graph throughout the code-base (without having to run or debug the solution).

Wish I'd seen that three hours ago.  So much easier than a breakpoint and walkthrough.

Labels:


posted by ruffin at 12/07/2012 01:42:00 PM
0 comments

Visual Studio 2008 Debugging Tricks – Advanced Breakpoints:

Put simply, an advanced breakpoint is a breakpoint with one or more modifiers applied. A modifier allows you to change the runtime actions or conditions that will cause the breakpoint to be triggered, or in some cases even set.

In order to set an advanced breakpoint, you must first set a normal breakpoint and then choose a modifier to set from a context menu.

I'm embarrassed to admit I've not yet used this.  I'm pretty sure I knew of their existence, but as too often happens, I have that awareness raised when I'm in the middle of something "more pressing", so I don't take the time to fully explore.

Reminds me of my first few years using vi/m, which we call The Pico Years.

Labels:


posted by ruffin at 12/07/2012 11:10:00 AM
0 comments
Wednesday, December 05, 2012

Google Chairman Eric Schmidt Says Apple and Google Will Resolve Issues 'the Adult Way' - Mac Rumors:

The adult way to run a business is to run it more like a country. They have disputes, yet they've actually been able to have huge trade with each other. They're not sending bombs at each other.

I think both Tim [Cook, Apple's CEO] and Larry [Page, Google's CEO], the sort of successors to Steve [Jobs] and me if you will, have an understanding of this state model.

This metaphor scares me a little, though obviously it's already the world we live in.  The real empires use legacy empires as foundation.  On one hand, I'm happy to have patent squabbles out of the courts, but I'm upset with the implicit connotation that corporations should essentially be making law.

For me, I think the bottom line is that [the current system of] patents let copyright overreach its useful bounds.

Macrumors paraphrases more of the interview thusly [sic]: "He also noted that the litigation would continue for "a while" and that the big loser is not Apple or Google, but a smaller company trying to get an operating system off the ground as they wouldn't have the necessary patent coverage."

Is that accurate?  What does Linux do for mobile devices?  I'm completely in the dark here.  Is Linux allowed to use patents because nobody sued early enough to protect them?  Or does Linux not violate patents?  Is "everything" in Linux (pick a distro) based on "prior art"?  Certainly Red Hat has pockets deep enough to sue, right?  If Fedora (or whatever Linux they're running) tripped up on patents, you'd think they'd would be sued -- or that the non-pursuit means the protection of those patents (though here I notice I'm stupidly conflating (c) with patents) is void?

That is, if I put DistroX on a hand-held device, how could that violate a patent any more than DistroX on a mobile device?

I wish the FSF would release MobileHurd and have pockets deep enough to protect against suits -- sort of a detente invoked by the fear of mutually assured annihilation.  But then I'd be using state-based metaphors.

EDIT: Some reading: http://en.wikipedia.org/wiki/Software_patents_and_free_software
EDIT2: More reading and a quote:

http://money.cnn.com/magazines/fortune/fortune_archive/2007/05/28/100033867/

So if Microsoft ever sued Linux distributor Red Hat for patent infringement, for instance, OIN might sue Microsoft in retaliation, trying to enjoin distribution of Windows. It's a cold war, and what keeps the peace is the threat of mutually assured destruction: patent Armageddon - an unending series of suits and countersuits that would hobble the industry and its customers

"It's a tinderbox," Moglen says. "As the commercial confrontation between [free software] and software-that's-a-product becomes more fierce, patent law's going to be the terrain on which a big piece of the war's going to be fought. Waterloo is here somewhere."

Cue the Admiral.

Labels: , , ,


posted by ruffin at 12/05/2012 12:38:00 PM
0 comments

MSDN Magazine: Team Foundation Server - Visual Studio TFS Branching and Merging Guidance:
We recommend minimizing the number of levels in a branching hierarchy. Adding an integration layer between Main and the Feature Team branches effectively doubles the merges required to move changes between the Main branch and the Feature branches. Branching helps isolate changes, but the cost of branching is the resulting effort needed to merge code between branches and to resolve merge conflicts that always seem to present themselves. Adding an integration layer doubles the merges and likely doubles the effort to resolve merge conflicts.

I don't know where to start.  This is painful.  Branches might double the number of merges (and it doesn't even do that -- merge into your "integration" branch a billion times, and merge into your Main branch nightly -- so that's only a factor of nights/billion more merges), but an integration branch does not double the effort of those merges.  With smart branching and merging, merges should be targeted, deliberate affairs.

The difference between TFS and git users seems to be a very serious cultural one.  I'm not down enough with TFS yet to know if it's also a technical one, but my first impression is that TFS and git should be functional equivalents.  The rigidity of TFS culture creates programming inefficiency.  TFS makes you behave like you have to go to the Roman Forum to talk to your neighbor.  Talk to your neighbor first, get on your own solid page, and then, in some metaphor-busting move, the you & your neighbor combine into one entity to present your ideas at the Forum.  Or maybe your whole neighborhood merges first.  Or maybe your whole neighborhood plus that really smart dude from Romania.

And if I hear TFS is better for large projects one more time, I'm going to go [figuratively] insane.  git was created specifically to develop the Linux kernal.  Sheesh.

Labels: ,


posted by ruffin at 12/05/2012 07:44:00 AM
0 comments
Tuesday, December 04, 2012

Because someone had to say it.

Labels: ,


posted by ruffin at 12/04/2012 03:50:00 PM
0 comments

Support freedom
All posts can be accessed here:


Just the last year o' posts:

URLs I want to remember:
* Atari 2600 programming on your Mac
* joel on software (tip pt)
* Professional links: resume, github, paltry StackOverflow * Regular Expression Introduction (copy)
* The hex editor whose name I forget
* JSONLint to pretty-ify JSON
* Using CommonDialog in VB 6 * Free zip utils
* git repo mapped drive setup * Regex Tester
* Read the bits about the zone * Find column in sql server db by name
* Giant ASCII Textifier in Stick Figures (in Ivrit) * Quick intro to Javascript
* Don't [over-]sweat "micro-optimization" * Parsing str's in VB6
* .ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); (src) * Break on a Lenovo T430: Fn+Alt+B
email if ya gotta, RSS if ya wanna RSS, (?_?), ¢, & ? if you're keypadless


Powered by Blogger etree.org Curmudgeon Gamer badge
The postings on this site are [usually] my own and do not necessarily reflect the views of any employer, past or present, or other entity.