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, June 30, 2012

A Small Matter of Programming: Painless Merge Conflict Resolution in Git:
To find the changes that went into each branch, we need to know what the merge base (state A) looks like. The most basic mechanism by which git allows us to do so is to set the merge.conflictstyle option to diff3 by executing the command:

$ git config merge.conflictstyle diff3

This setting gives you a third chunk in each conflict during a merge that shows the contents of the original from which the two current files you're merging originated.  Below image is from "A Small Matter of Programming".  Traditional conflict files have B & C.  The new content is from A.



<<<<<<< HEAD
roses are #ff0000
violets are #0000ff
all my base
are belong to you
|||||||
roses are red
violets are blue
all my base
are belong to you
=======
Roses are red,
Violets are blue,
All of my base
Are belong to you.
>>>>>>> master

Labels: ,


posted by ruffin at 6/30/2012 05:51:00 PM
0 comments
Friday, June 29, 2012

Health Care Dissent: Here's What The Conservative Wing Wanted To Happen:

It is true that, at the end of the day, it is inevitable that each American will affect commerce and become a part of it, even if not by choice.

Okay, so my headline reaches a little, taking everything literally and maybe pushing on "commerce" unfairly.  But I think it's a relatively safe assumption that's what they mean.  Honestly, it's not that controversial, is it?

Labels: ,


posted by ruffin at 6/29/2012 09:09:00 PM
0 comments
Thursday, June 28, 2012

Apple Planning Major Overhaul of iTunes to Emphasize iCloud and Sharing - Mac Rumors:

The revamped iTunes application is set to launch before the end of the year and is said to be one of the largest sets of changes since the iTunes Store's debut in 2003.

Sorry for the sorry headline.

iTunes was released in 2001, and except for Genius and iPod integration, its musical side is essentially unchanged.  I've complained here a few times that I was disappointed with its inability to provide a semantic style/group think synthesis of your music into something more resembling a personal radio station.  I'm disappointed that it doesn't have the rough edges (and there are many more) smoothed out in general for what's closer to a reasonable decade's worth of edge cases. I really like the way Pandora suggests new music, and have purchased probably 10-12 CDs in the last year, nearly all from stuff I've "found" (or had plattered) for me by them. Why iTunes still can't do the same -- and beat it by using the songs it knows I have and like -- I don't know. iTunes Match is still something I feel like I should get for free, at least if I'm using a relatively recent Mac.


I don't know. Hopefully they're finally pushing past the aughts.

Labels:


posted by ruffin at 6/28/2012 09:34:00 AM
0 comments
Monday, June 25, 2012

Orbitz Presenting More Expensive Hotels to Mac Users - Mac Rumors:

Travel shopping site Orbitz is offering more expensive hotels to Mac users because the company found Mac users prefer more luxurious rooms, reports the Wall Street Journal.

Honestly, that's brilliant. And Ballmer's got to be loving it on some level too.

posted by ruffin at 6/25/2012 08:53:00 PM
0 comments
Friday, June 22, 2012

Comparing and merging files - WinMerge 2.12 Manual:

The left File pane file header is titled, Theirs File. This side represents the file that is usually in the version control system's repository. This file usually cannot be edited, so WinMerge sets the left File pane to be read-only. This means that differences can be merged only from this file to the other file.

Look, I understand you can't save the changes into the right side, but come on.  The whole goal is to go through and have identical files.  I should be able to use the right side as a crutch and select either.  Even if I can't save it, the freakin left side should be able to "override" the edits.  Otherwise I'll never have identical "files" and be able to visualize "done".

Sheesh.  It's free, I know.  I know.  I KNOW.  But sheesh.

Labels: ,


posted by ruffin at 6/22/2012 03:57:00 PM
0 comments

location - Where does git config --global get written to? - Stack Overflow:

git config --global --edit should tell you the exact location no matter what kind of setup you have--just look at what file comes up in your editor. – MatrixFrog Aug 11 '11 at 17:02

Labels:


posted by ruffin at 6/22/2012 01:50:00 PM
0 comments

ASP.NET Web API vs. ASP.NET MVC "APIs" � Encosia:

If you want to bring Web API’s behavior more in line with the output of MVC’s Json() helper, you can remove XML support from your API entirely. Just add this to the Application_Start event and you’ll never see XML again...

Good riddance.  Never have I seen since a bloated, kitchen-sink approach become so unquestionably adopted.  Sure, XML does everything you'd ever need, but the times you need more than JSON (what, I've already mentioned, is little more than a home-rolled string format) really are pretty rare. 

I know I've mentioned it before, but years ago I remember getting a doc from our resident XML expert promoting its benefits, and search and replaced every occurrence of "XML" with "ASCII" before sending it back to him.  The accuracy of the doc really hadn't changed at all, somewhat surprisingly.  He took it as the good natured jabbing I intended (XML couldn't be stopped at that point), but I think, for at least that once ;^D, I was ahead of the game.

It's all zeroes and ones.  XML doesn't necessarily make something human and machine readable at the same time.  It can, but one look at OOXML tells you that this human readability isn't a requirement.

Maybe the lesson is that we underestimated our ability to read like a machine.  They are modeled after us (how can they not be?  We made them up) to some degree, after all.

Labels: , ,


posted by ruffin at 6/22/2012 08:18:00 AM
0 comments
Thursday, June 21, 2012

Pair programming - Wikipedia, the free encyclopedia:

A study (Lui 2006) presents a rigorous scientific experiment in which novice–novice pairs against novice solos experience significantly greater productivity gains than expert–expert pairs against expert solos.[14]

posted by ruffin at 6/21/2012 09:15:00 AM
0 comments
Wednesday, June 20, 2012


Word to the wise: SQL*Loader doesn't like Mac file endings. Use TextWrangler's Save As to convert to Windows (or UNIX) file endings to make your csv sqlldr ready.

Labels: , , ,


posted by ruffin at 6/20/2012 09:01:00 AM
0 comments
Monday, June 18, 2012

Saw the MacBook Pro with Retina display this weekend. Wow. It's really as good as Apple's hype, and, honestly, I'm not usually blown away by Jobsian hyperbole.

So here's my "proof", hurriedly and, unfortunately, low-resolutioned-ly uploaded to imageshack from the Apple Store:



Assume that tiny font is crystal clear. No, really. Note the point size. Five. Yes, five. And you could go lower.

Seriously, the font scales smaller than you could ever imagine, but stays razor sharp. Configure your IDE however you want. You'll have the space.

Labels: ,


posted by ruffin at 6/18/2012 09:35:00 AM
0 comments

kdiff3
DeltaWalker (2010)
Kaleidoscope
Araxis Merge

List from SuperUser.stackoverflow

Labels: ,


posted by ruffin at 6/18/2012 09:06:00 AM
0 comments



When did this happen, exactly?

Edit: Ah, it's about search engine weights for any javascript documentation you like, not that Moz allows you to edit docs (though apparently Moz does).

Then as more people being to link their articles, note this part is key, AND put buttons in, we can change the search results. We are also working to improve the MDN and other such resources as well as pool them together in a more concise manner. This is not something that is a one off item, but a long term commitment for us, by us to improve things.


Strange that the auto-generated links send you to different places in the moz js docs with each load (String, regex, array, global object, etc). Perhaps that's how you have to spoof search engines now?

Another edit: Bizarre.

Ace is a standalone code editor written in JavaScript. Our goal is to create a web based code editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page and JavaScript application. Ace is developed as the primary editor for Cloud9 IDE and the successor of the Mozilla Skywriter (Bespin) Project.


This Javascript app thing really has gotten out of control. ;^) $15 a month for an open source IDE (Cloud9 IDE) that was $49/month? I must be reading something wrong.

Labels: ,


posted by ruffin at 6/18/2012 08:39:00 AM
0 comments

git-mergetool(1):
If the custom merge tool correctly indicates the success of a merge resolution with its exit code, then the configuration variable mergetool..trustExitCode can be set to true. Otherwise, git mergetool will prompt the user to indicate the success of the resolution after the custom tool has exited.

Yeah, I'm going to say never set this to true.  I've had a lot of trouble using kdiff3 with SourceTree and git, with kdiff3 saying things merged or SourceTree reading the exit wrong.  I think it's my kdiff3, since I've had at least one flub on the command line.

So rather than have to restart merges or, worse, grab the original merge file and run it through WinMerge or similar, I'm setting this to false every time.  Ask me.  If I'm taking the human time to merge, I can take the human time to say whether it worked.

9  [mergetool "sourcetree"]
10 cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh
\"$LOCAL\" \"$REMOTE\" -ancest
11 trustExitCode = false
12 [apply]
13 whitespace = nowarn
14 [merge]
15 tool = kdiff3

Labels: ,


posted by ruffin at 6/18/2012 08:35:00 AM
0 comments
Wednesday, June 13, 2012

From "no upside":

You can argue that a university education is overrated relative to cost. Most private universities probably aren’t worth the money. A handful at the very top might give you a solid alumni network, access to top-notch researchers, or a name on the resume that opens doors. But most private university costs are disproportionately high relative to their long-term economic value.

I think that about sums it up.  Probably most state schools too.  They often seem more interested in doling out lottery dollars to their favorite construction firms at this point than putting tuition and the poor man's self-inflicted tax to good use.

More and more university education is vocational training, and you're going to do a better job, 9 times out of 10, learning the job while on the job.  There's a role for good, critical approaches to systems, but when you can't even find that in a university's humanities college (look up N. Katherine Hayles' "digital humanities" concept for the core of this evil), it's time to apply for work, not take out a loan to tread water.

posted by ruffin at 6/13/2012 03:21:00 PM
0 comments

Firefox Disable / Hide New Tab Page:

HowTo: Turn this feature off completely

In the Location bar, type about:config and press Enter:
about:config
The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise!, to continue to the about:config page. Type browser.newtab.url in the search box:
browser.newtab.url

Thank you.

Labels: ,


posted by ruffin at 6/13/2012 01:43:00 PM
0 comments

+, ?, |, {, }, (, and ) must be escaped to use their special function.


I love regex as a rule. I'm not as big a fan of individual implementations of its concepts. Couldn't figure out how to get X repetitions of a pattern while searching in VIm, and it's because { has to have a \ to work.

Who knew? Voodoo. What up with that?

So if I'm looking for table names over 30 characters in a text file (as Oracle doesn't like identifiers over 30 chars -- spits it out), the "right" regex is...

/[A-Z_]{30}

But for VIm it's:

/[A-Z_]\{30\}

(Yes, characters in the name must be caps or underscores)

Profit.

Labels: , ,


posted by ruffin at 6/13/2012 01:25:00 PM
0 comments

sqlite> .mode column
sqlite> .header on
sqlite> .width 15 15 15 15 15 15 15 15


That's all.

Labels: ,


posted by ruffin at 6/13/2012 12:41:00 AM
0 comments
Monday, June 11, 2012

Daggum Apple Profit Maximization Machine, I want in. The MacBook Pro with Retina display is everything I want in a laptop, well, short of the price.

There's only one thing stopping me from knowing not if but how to pull the trigger -- I just watched the video on apple.com, and I don't think the RAM is user upgradeable. 8 gigs is plenty for me right now, but to think I could never upgrade it is a little strange for a machine that costs more than two of my cars.

Do you spend $200 now or just sit and spin on it? There's no way I would've gotten an Air with 2 Gigs, but 8's plenty, right?

EDIT: Well, I started thinking about ordering when it was shipping in 5-7 days, then waffled until it was 5-10, and now it's 2-3 weeks. I guess I'll start vulturing the store instead.

Seriously, it's all about the pixels.

Labels: ,


posted by ruffin at 6/11/2012 06:51:00 PM
0 comments

I jumped into Coda 2 while it was on sale for $50. It's sort of exactly the kind of app you'd write if you started writing an app to do a few menial tasks for AMP stack development but had it grow out of control. Except that Coda 2 is much smoother than your hackarific app would've been, with the downside that it unfortunately also exhibits Cabel Sasser's idiosyncrasies instead of your own.


It's not as useful a daily editor for me because of its relative lack of quick keystrokes, as I'm a pretty hard and fast VIm user. But for mousing around, none's better. The new file navigation is incredibly fast. You can click any folder in the pwd of your current file and bam, instant navigation from there. You can navigate to different child folders than your current file and bring it up very quickly.

The code folding, where it'll fold up whatever's between brackets and hide that text from you, is also the most intuitive I've seen. The cool, Atari 2600 like gradient on the left side of the app shows how deep you are into the code's folds (darker is deeper) is also very cool, giving a quick visual of where you are and what a fold will take out of your way (example on the left of this post).

As a PHPStorm user, I'm also very happy that this (seems) native. Very quick editing.

If you are AMPing it, the MySQL tools will keep you out of phpMyAdmin, which is nice. Previewing websites is pretty painless. I haven't tried SFTP yet, but am a Transmit user, so I'm guessing it'll be pretty solid.

The one feature I wish I could see as well implemented elsewhere is code clipping. You can create snippets of text with hotspots inside and tab from one hotspot to the next. You can also insert these code snippets with hotkeys, so with very little energy, you can slap in a complicated text block with multiple function calls and tab from parameter to parameter to enter each quickly. For me, the real "slick" icing was the discovering that you can shift-tab back to your last hotspot even after editing it. A video would explain better, but for oft-used blocks of text that require a touch of change each time, Coda 2 is wonderful.

On the down side, the autocomplete isn't real hot (okay, it stinks), and there are serious issues with use over Samba shares (not that I've lost data, but if the share drops, you're in an annoying amount of trouble; there's no real restart. Coda just drops the files and makes you set things up again). There's no alert for errors in javascript like PHPStorm, which stink0rz hard. Nor is there the ability to jump to the declaration of a javascript function or variable, which slows me down. It's not a hard core javascript editor, and with more and more jQuery and ExtJS style javascript apps with very little html online now, that's a real stumbling block.

You get the feeling Panic.com isn't a javascript intensive site, so neither is Coda. This is potentially an example of eating your own dogfood and paying for it. Remember how I said this is kinda like Sasser's app written to help Sasser code for the web? It's slick, but it's not my set of priorities.

That's why, ultimately, I get the feeling I'm living in someone else's workflow. I'm sure Sasser can code like a man possessed using Coda to make sites like Panic.com, but without a manual or intro video, etc, I'm mostly in the dark. Lots of great stuff, but much of it is initially inaccessible to a new user, and much of the must-have stuff I've come to expect from my use of PHPStorm is missing. It took me years on top of years to use VIm efficiently. I'm not sure Coda has the same staying power or is worth the same sort of investment, or even if I did give it that investment that I'd be as well rewarded as I am now in PHPStorm.

That is, PHPStorm has the features a Sasser-like or mfn-like coder needs to get the job done. I'm afraid Coda might only really have the former.

So far, though, Coda provides an idiosyncratic yet enjoyable vacation from my normal tools when I want to "take a break" of sorts from the usual grind. It can't yet replace my use of PHPStorm with the IdeaVIM plugin, but Coda 2 is solid enough now to provide a nice alternative in ways Coda 1 didn't.

Labels:


posted by ruffin at 6/11/2012 08:16:00 AM
0 comments
Wednesday, June 06, 2012



Okay, do we think that was an accidental/cutesy inclusion of a Diablo ordering page on the Top Sites explanation page or a paid advertisement? My kneejerk was the former, and about 5 seconds later I started thinking the latter.

Labels: , ,


posted by ruffin at 6/06/2012 10:28:00 AM
0 comments

... is here: http://gitready.com/beginner/2009/01/10/stashing-your-changes.html.

Labels: ,


posted by ruffin at 6/06/2012 10:14:00 AM
0 comments

Software is hard - Salon.com:

[Q:] You always hear, with regard to software, that managing developers is like herding cats, and what you just said kind of alludes to that. Does that mean one of the problems with getting software projects done on time is the psychology of the people who are actually doing it?

[A:] That’s a huge and fascinating subject. There is this raw fact in the field that the best way to create software would always be to have just one person write it. At Salon, our original content management system, the predecessor to the big one that was a disaster, was a much smaller system that one developer wrote. It was limited, but the process of creating it was much less painful.

That's just simply not true.  Your best move is to encapsulate and have each programmer work on their own tasks that don't have deep dependencies on any other building block, sure, but code doesn't really get solid without having a few folks look through it, finding those bugs and oversights that the original coder can't see for the trees.  It's great to have guys who code with similar logic that can understand what the other's saying, but you still have to trade and review.

I'm looking forward to reading the book, but this really does sound like bad management and scoping.

posted by ruffin at 6/06/2012 12:24:00 AM
0 comments
Tuesday, June 05, 2012

Why can't iTunes add to a track's played count if you listen from the CD? Is it really that difficult to trace sources? Even an iTunes Music Store purchase could have a sort of parent id that maps to a CD.

It's the rough edges this many years into the app's life that make me wonder. It should be slick in unimaginable ways by now.

Labels:


posted by ruffin at 6/05/2012 05:08:00 PM
0 comments
Friday, June 01, 2012


(image by Chang W. Lee/The New York Times)


Okay, look. NYC has been warning they were going to tax soft drinks for a while. I'm not against that, really. An over availability of cheap calories over an under availability is A Good Thing, but come on (he says as he sips a Pepsi). We don't need soft drinks to insure everyone stays healthy.

But here's my real problem -- you're going to tax 32 oz drinks with resealable caps? Really? If you want to force makers to release single-serving containers (I'm looking at you, 12 oz Pepsi) in sensible sizes, like 9-10 oz, great. But if they have a resealable top, well, whose fault is it that you drink it all at once? I just nursed a 24 oz Dr. Pepper through three days. You can too.

No reason to tax mfgrs for consumers' gluttony. You tax manufacturers for their encouragement of over-consumption, but that stops at the pop cap, I think.

Labels: ,


posted by ruffin at 6/01/2012 01:04:00 PM
0 comments

How to use kdiff3 as a 3-way merge tool with mercurial, git, and Tower.app - Ted Naleid:

A 3-way merge actually has four important sources of information:

LOCAL – your file with the changes you’ve made to it
REMOTE – the file you’re merging in, possibly authored by someone else
BASE – the common ancestor file that LOCAL and REMOTE came from
MERGE_RESULT – the file resulting from the merge where you resolve conflicts 

You often need to see all four of these pieces of information to make intelligent choices. Where you came from (LOCAL), where the other person’s changes came from (REMOTE), where you both started (BASE) and where you are now (MERGE_RESULT).

Personally, I prefer seeing just two files with undos.  You view the changes, chose a winner, have the section of both files match that choice, and *POOF*, the highlighting for that conflict in the file margins disappears as if it were never a conflict.  WinMerge works about perfectly.

But though I'm not sure I get three panes (what's canonical again?), I do get 4-panes.  Do I want what I've got, what you've got, or what we started from (though, as my WinMerge pref shows, I'm assuming we don't want what we started from any more, else what kinda programming flunkies are we, anyhow)?  And once I select a "winner", show me in a fourth (or, to follow WinMerge or JEdit's JDiff, just make the winning change to all three).

KDiff3 does that just well enough that I'm using it to merge in git on OS X now.  SourceTree won't call it successfully yet for some reason, but git mergetool works fine from iterm for now.  Setup is only slightly unintuitive, and though the UI is a little klunky, it works just fine.  What's not to like about OSS?

Labels:


posted by ruffin at 6/01/2012 10:53:00 AM
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.