|
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. |
|
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! |
|
| Friday, August 31, 2012 | |
|
C# Station: Event Handling in C#: // Invoking Method or EventHandler Labels: c#, noteToSelf posted by ruffin at 8/31/2012 10:27:00 PM |
|
| 0 comments | |
|
Ghosts in the ROM � NYC Resistor: While digging through dumps generated from the Apple Mac SE ROM images we noticed that there was a large amount of non-code, non-audio data. Adam Mayer tested different stride widths and found that at 67 bytes (536 pixels across) there appeared to be some sort of image data that clearly was a picture of people. The rest of the image was skewed and distorted, so we knew that it wasn’t stored as an uncompressed bitmap. A 25 year-old Easter egg. That's awesome. Here's one of the four hidden images. Labels: apple posted by ruffin at 8/31/2012 12:35:00 PM |
|
| 0 comments | |
| Tuesday, August 28, 2012 | |
|
Is it just me, or is Gmail's online interface becoming too cluttered? It's trying to be a desktop client. The beauty of Gmail in the browser is twofold: Clean interface and great searches. That's it. Heck, with the phone and chat UIs, it's morphing from a complicated desktop application to a desktop. That's bad. It's strange to think that sometimes not being quite done is your advantage, but after spending a little time in the fairly refreshing Outlook.com interface (rough around the edges, sure, but clean, with improved search), Gmail hits me as too cluttered. Microsoft is potentially doing something right, though it might take Windows X before they get a feel for it. They're finally doing the Apple trick -- give everyone 90% of what they want better than they expected it, and tell them that's it. You're not getting your last 10%, because there are six billion last 10%s. We're giving you what we want, and you're going to like it, because it's smooth. Google has, I think, finally [at least temporarily] plateaued. Wonder if Yahoo can make a comeback. posted by ruffin at 8/28/2012 09:10:00 PM |
|
| 0 comments | |
| Sunday, August 26, 2012 | |
|
Devil’s advocates play up sympathy for Samsung after Apple trial — RoughlyDrafted Magazine: Google hasn’t been tremendously successful with Nexus, but it has up until now been forced to compete against both Apple’s iPhone and Samsung’s counterfeit iPhone. Google and its licensees, along with RIM and Microsoft/Nokia, now only have one iPhone to compete against, making their jobs all that much easier. I still think Dilger's a blowhard, and am happy to see whichever rumor site was reflagging his crazy posts has stopped, but he's got a great point here. All of Android gets to start competing differently instead of competing against every other phone company as they try to make a better iPhone. Honestly, every freakin' smartphone is the same. It's a monoculture extraordinaire. Where's the bright green phone that's shaped to fit in my hand allowing me to text with Engelbart's chords? It's about time someone kickstarted a little ingenuity. At some point, they might get lucky, make a better mousetrap, and take the iPhone down. Hopefully the courts have moved these guys' cheese. Labels: android, iphone, smartphone posted by ruffin at 8/26/2012 06:24:00 PM |
|
| 0 comments | |
| Thursday, August 23, 2012 | |
|
How do you do it? Here's the quick answer: SELECT Course it helps that NULL = '' in Oracle. posted by ruffin at 8/23/2012 04:29:00 PM |
|
| 0 comments | |
| Wednesday, August 22, 2012 | |
|
What a pain. I've wasted hours trying to take in an index and produce a unique color to go with it. Here, it's to create icons that represent which table, out of over six-thousand, is a particular attribute's origin. It's impossible to come up with 600, much less 6000, easily discernable colors, I think. But this seems to work as well as it's going to without displaying more than one color at a time. <head> <script> function determineViewRGB_stepped(i) { var intNum = 10; var lumStart = 80; var lumStep = 19; // seems about right to ensure all colors // are noticeably different from their neighbors in this scale. var modNum = (i%intNum); var divNum = ~~(i/intNum); var modDivNumBy6 = (divNum%6)+1; var divCntBySteps = ~~(i/ (lumStep+1) ); var int111Iterations = ~~((i)/(intNum*6)); var intZero = (int111Iterations * lumStep)%256; var intValue = ((modNum * lumStep) + lumStart) % 256; // console.log('i: ' + i + ' -- modNum: ' + modNum + ' divNum: ' + divNum // + ' modDivNumBy6: ' + modDivNumBy6 + ' divCntBySteps: ' + divCntBySteps // + ' intZero: ' + intZero // + ' int: ' + intZero // + ' intCompleteIterations: ' + int111Iterations); var intR = intZero; var intG = intZero; var intB = intZero; if (modDivNumBy6 & parseInt("1", 2)) intR = intValue; if (modDivNumBy6 & parseInt("10", 2)) intG = intValue; if (modDivNumBy6 & parseInt("100", 2)) intB = intValue; var strReturn = 'rgb(' + intR + ',' + intG + ',' + intB + ')'; return strReturn; } function createViewIcon(intAttribViewId) { var strReturn = '<span class="circle" style="background:' + determineViewRGB_stepped(intAttribViewId) + ';"> </span>'; return strReturn; } </script> <style> .circle{ width:8px; height:8px; border-radius:4px; font-size:8px; color:black; line-height:8px; text-align:right; float:left; } </style> </head> <body> <!-- It's close, but I think you can eyeball the difference between the first and second circles --> <script> document.write(createViewIcon(1) + createViewIcon(2) + createViewIcon(400) + createViewIcon(3000)); </script> </body> Just for fun, let's try it out. EDIT: This apparently doesn't work in IE9 unless you're in IE7 mode. That's no fun. I need to go back to the page where I got the CSS code from, as at first it did work for me in IE9, but I'm not sure what compatibility settings I had going on there. Labels: code, javascript posted by ruffin at 8/22/2012 02:26:00 PM |
|
| 0 comments | |
|
PEP 20 -- The Zen of Python: The Zen of Python Kinda loses its own championed terseness at the end, but good reading. I think the only thing I disagree with strongly enough to complain is, "There should be one-- and preferably only one --obvious way to do it." No, that's obviously not true, as the dude's own blog seems to suggest. Labels: coding posted by ruffin at 8/22/2012 09:30:00 AM |
|
| 0 comments | |
| Friday, August 17, 2012 | |
![]() It's actually pretty enjoyable looking back over a git branch history. Labels: git posted by ruffin at 8/17/2012 11:42:00 AM |
|
| 0 comments | |
| Tuesday, August 14, 2012 | |
|
It's a question we all wanted answered at one time or another. Why? So that we can programmatically create icons of whatever color we want without sitting in Paint for hours changing dot colors. (Edit: Okay, I have done the color block with background-matching gif/png with transparent middle before, but that still feel kludgey. I'm happy enough with this degrading to blocks on older-but-not-ancient browsers.) How to Create Circles with CSS | Bryan Hadaway's Web Tech Blog: Making circles with CSS3 is very simple, but not very well supported with older browsers. If your design depends on circles (and you need to accommodate users on older browsers) you should definitely use images instead. I wanted icons then text, and the below works (spacing's a little weird so it'll fit in the blog design). There's some extra stuff as I tried to figure out why IE9 wasn't playing nicely. Turns out it's the lack of a doctype at the top. Once it's there, it all worked. Not so lucky in Camino (essentially Firefox 3.6). <!DOCTYPE html>So here that looks like this (the first row is what I wanted)... Hello Hello (without spacing out) Hello Spam Labels: css posted by ruffin at 8/14/2012 06:30:00 PM |
|
| 0 comments | |
|
Is there any way to "paste as quotation" in Outlook 2011 for - Microsoft Answers: Is there any way to "paste as quotation" in Outlook 2011 for Mac? According to Guruprasad Ra, a "Support Engineer" (so he likely knows better than most), apparently not. Sure, you could write a macro, but that takes some googling & there's no guarantee that wouldn't require a lot of testing (the one above is apparently buggy after 2003). I have no idea how Outlook 2011 was released. Honestly, Microsoft should have put all their engineers on creating a connector for Exchange and then bought a great email client already released for the Mac -- or even just tweaked and rebranded Thunderbird. That'd be some interesting MS PR. Labels: email, microsoft, outlook, outlook fail posted by ruffin at 8/14/2012 08:57:00 AM |
|
| 0 comments | |
| Thursday, August 09, 2012 | |
|
Okay, maybe vba-ing your way from Excel files to raw SQL isn't the way most folks extract, transform, and load, but I like it okay when you get an Excel file of values. This code is essentially the same as this jive from 2009, but I like that I've finally given up on adding a UserForm, naming it, adding a text box, naming it too, then stretching each until they look like a finished product. Instead, I now just add a form, double-click a TextBox on there, and let this programmatically do the rest. Option ExplicitLabels: code, excel, noteToSelf, vba posted by ruffin at 8/09/2012 01:13:00 PM |
|
| 0 comments | |
| Wednesday, August 08, 2012 | |
|
You know in chess when you and your opponent make the same move back and forth thrice that it's a draw. git needs to realize when this "threefold repetition" is happening too. If I have a file with a line that I need for, let's say, local debugging, then the maintainer waxes that line to make it live, then I rebase, take it back out to test locally, then check back in, overwriting the live fix... ad infinitum. That's bad. git, left to its own devices, will often auto-merge those changes without letting anyone know. It shouldn't. posted by ruffin at 8/08/2012 02:11:00 PM |
|
| 0 comments | |
| Tuesday, August 07, 2012 | |
goto case (int)POINTS_OF_ORIGIN.SPATIAL; // Yep, went there. Labels: confessions posted by ruffin at 8/07/2012 05:24:00 PM |
|
| 0 comments | |
|
Had a process go on too long, and I couldn't tell which of the several I had going was the greedy one. process - How do I show running processes in Oracle DB? - Stack Overflow:
Voila. There are a few names on StackOverflow that I'm starting to recognize, and this Justin Cave is one of them. I wonder how much of this is conscious branding and how much is [neurotic?] compulsion. I can see how it'd be addictive, especially once you're an expert in something. I'm no expert, but the git questions are just light enough on experts I could get sucked in. Labels: noteToSelf, oracle, stackoverflow posted by ruffin at 8/07/2012 12:49:00 PM |
|
| 0 comments | |
|
Materialized View Concepts and Architecture: This chapter explains the concepts and architecture of Oracle materialized views. Profit. Labels: noteToSelf, oracle posted by ruffin at 8/07/2012 10:01:00 AM |
|
| 0 comments | |
|
from here: select lower(sys_context('USERENV','SESSION_USER'))||... if only to check my sanity at one point. Labels: noteToSelf, oracle posted by ruffin at 8/07/2012 09:54:00 AM |
|
| 0 comments | |
| Monday, August 06, 2012 | |
|
Rory Primrose | Using WinMerge with TFS: Note: You need to click on the Save button on the tool bar within WinMerge merge to commit a merge before exiting the screen I can't tell if this should fix things or not, but hitting Ctrl-S isn't working for me right now. I go back into git after resolving the conflict with WinMerge and the conflict markers are still there. posted by ruffin at 8/06/2012 02:26:00 PM |
|
| 0 comments | |
|
WebKit Isn't Breaking the Web. You Are | Webmonkey | Wired.com: We at Webmonkey hope it’s obvious that building WebKit-only sites is a waste of time. If you’re only interested in iOS users then take a tip from Instagram and build a native app. Let's just quickly say that's crazy advice, and it misses the point of Glazman's critique. If you don't know Objective-C, by all means, leverage what you do know if it'll make a strong HTML5 app for mobile devices. Use PhoneGap. Enjoy. No guilt required. Seriously, if you can't code HTML5 for other browsers you need to learn to code Obj-C in Xcode? Insane and inane. The point is that those who use HTML5 shouldn't use browser-specific prefixes. Not sure how I feel about that either. If one browser (or rendering engine) is so far in front of another, then it's going to "win" the adoption war. Examples are written with webkit prefixes, they're copy and pasted, seem to work okay for their intended browser, and we're done. It's a non-trivial expense to learn that webkit isn't a standard if you're a gunslinger. (I'm not arguing we should be gunslingers, but that browsers should realize they exist. LOTS of them.) If the other browsers support those CSS standards with their own prefixes (and with standardized ones), it's a heck of a lot easier to have the browsers support the different models than every programmer. Any time you're asking a programmer to write something twice to do things right (really, I'm pretty tired of if (document.getElementById) { branch1 } else...), you're doing it wrong. Get the cheese off of your face. Normalize. Put the logic where it belongs. To be clear: In this case, it means Firefox needs to get over itself and chase WebKit. IE might follow. Do we care? It's an ivory tower versus the market issue. You can't control programmers absolutely. I, in theory, like where Glazman is going. And in practice, just mentioning it will lessen the issue. Let's just stop pretending it's a zero-effort change for programmers to write platform neutral code and, therefore, as long as browsers are less than 100% equal, you'll always have a percentage of the code in the wild that supports one over the other. Degrade? Sure. Write to treat each version of each browser equally? Impossible. [sic] posted by ruffin at 8/06/2012 09:02:00 AM |
|
| 0 comments | |
| Sunday, August 05, 2012 | |
|
Here's what I think most people don't let themselves think about the cloud: Having your personal information online means anyone online has access to it. If you have your tax returns, Social Security card, and passport in your home, only someone in your home can get them. Digital information is available to anyone on the network where that info is stored. Thus Mat Honan's horror story where his computer, phone, and tablet (all Apple: Macbook, iPhone, iPad) are all locked and wiped remotely, with the hacker gaining his personal information, leading to the compromise of his business Twitter account, etc etc. You're almost better off on some level checking your email the old, POP3 way. Check your email online, pull it down, and have the server delete it. Back that up locally, and store another backup off-site periodically. Geography still matters. Geography still provides security, if you let it. I really enjoy being able to get pictures of family that I've emailed years ago immediately, but I don't need to do that with passwords, tax returns, and other personally identifying information. There should be a distinction made by the service. It should be harder than a simple password to get to emails with personal information. And it should be tougher than calling Apple support with personal information from Facebook (apparently how Honan's account was compromised; the hacker knew enough about Honan to talk the support tech into unlocking the account) to get to that info too. Where is the guy calling from? Does his voice match a voice fingerprint Honan willingly gave earlier? etc etc. Anyhow, here's a bit from Honan's "I was hacked" post describing what it's like. Worth reading. From Emptyage — Yes, I was hacked. Hard.: Here’s how I experienced it: EDIT: Wow, I've never seen so many stupid typos. Wth was I doing in August of 2012? Watching The Untouchables? posted by ruffin at 8/05/2012 02:36:00 PM |
|
| 0 comments | |
| Friday, August 03, 2012 | |
|
git rev-list HEAD -- path/to/file.cs How to figure out how many versions of a file exists in your git repo. Labels: git, noteToSelf posted by ruffin at 8/03/2012 10:22:00 AM |
|
| 0 comments | |
![]() No, I can't say I use Hotmail much for "real" email these days. Great spam bucket, though. Looks like Outlook.com thinks Camino is a mobile browser (or, rather, it sees it's not supported and goes to the mobile interface). Sad. Of course, Camino is pretty much dead now, so it's not a huge deal. I like it as my alternative browser at work for Gmail and, well, Blogger (the ctrl shortcuts (a, l, i, b) still work in Camino). Guess it won't be my Outlook interface. Outlook on Chrome is pretty snappy -- much faster than Gmail, and has a more intuitive search interface, I think. That said, it's sad that Gmail's archive of my mail goes back farther than Hotmail's, especially considering how I, like many that have a Hotmail account, I guess, used Hotmail years before Gmail was born. posted by ruffin at 8/03/2012 09:07:00 AM |
|
| 0 comments | |
| Thursday, August 02, 2012 | |
|
sql - why does my nested case statement return a character set mismatch? - Stack Overflow: The type of a case statement is determined by the first clause in it. In this case, the first clause is a varchar string rather than an nvarchar. Wow. Weird. String fields != strings if the field is an NVARCHAR. But slap an N in front of your quoted strings and you're golden. Slick interface you got there, Oracle. Labels: noteToSelf, oracle posted by ruffin at 8/02/2012 03:14:00 PM |
|
| 0 comments | |
|
Evil Brain Jono's Natural Log: Maybe software projects ought to design their architecture so they can do security/performance updates in separate development branches from UI-relevant updates? From the follow-up to the post I quoted from extensively in my last post. Really? You should design an app to abstract the UI from the engine? Crazy idea, that. Labels: development, gui, mozilla posted by ruffin at 8/02/2012 09:31:00 AM |
|
| 0 comments | |
|
Evil Brain Jono's Natural Log: It's not like we weren't warned. Lots of people in the community tried to tell us that this was a bad idea. But somehow, despite being an ostensibly community-driven organization, somewhere along the line we learned to tune out naysayers from the community. Bold emphasis mine. For Firefox extension developers (and I've done a little), the real take-home is here: "Worse yet, we didn't do enough to preserve add-on compatibility, making the updates extremely disruptive to people who depended on certain add-ons; and we kept going with our old version-numbering scheme even though the meaning of the numbers had changed completely, leading to mass confusion." Okay, also useful (this is becoming a "quotes to self" post): "Your users are temporarily tolerating your software because it's the least horrible option they have -- for now -- to meet some need." The post is more than worth reading for anyone working with software development. (discovered via link shared in the Real Software blog) Labels: dancing moons, development, gui, mozilla, noteToSelf posted by ruffin at 8/02/2012 09:17:00 AM |
|
| 0 comments | |
|
From Outlook.com Helps Microsoft Fight Google for the Workplace - The CIO Report - WSJ: Microsoft’s launch of the Outlook.com email platform, designed to replace Hotmail over a period of time, will help the company fend off Google’s challenge for its business in the enterprise. This guy's got it. Hotmail's going away as a site only because Microsoft thinks this will be the silver bullet allowing it to change the brand -- they've already tried to make Hotmail into MSN and WindowsLive, neither of which worked. It's not going away because consumers don't like it. It was the Coke of consumer email. It's now the Pepsi, but only barely. It's nowhere close to (ie, lightyears ahead of) Yahoo's Snapple. The crucial point is that Hotmail for consumers is fine. And Microsoft would love for you home users to keep using the site and clicking the ads. But Gmail is apparently making so much more cash on providing corporate (and university) Gmail "solutions" than advertising that Microsoft would just as well forgo the consumer ad revenue if it means they can sell to the enterprise. So poof, hello comes Outlook.com, adless hotmail with a few social features thrown in. Here's why it's a long-term winner (where "winner" here only means "better idea than just hotmail.com"):
The two biggest barriers to entry keeping business and other institutions from considering Hotmail for their email solution are gone. Profit. Labels: email, gmail, hats of money, hotmail, microsoft, outlook fail posted by ruffin at 8/02/2012 07:57:00 AM |
|
| 0 comments | |
| Wednesday, August 01, 2012 | |
|
Apple Expands Build-to-Order Configuration Options on Retina MacBook Pro [Updated] - Mac Rumors: Update: Some readers have noted that selection of the new CPU and storage options on the low-end model does not seem to register with the online store system. Typically, changing options results in live updating of the price and shipping estimates during the configuration process, but changes to the CPU and storage are not having that effect. Consequently, customers are unable to place orders with these new custom configurations on the low-end model. With this and the issues on the iTMS recently, we've seen a couple of issues where quick fixes were sent out and only slowly, I assume, propagate to each server farm. I think we can take it when some folks from the same geographical area see different stuff online that there was a hot fix deployed that's slowly replicating out. The only other option I can think of is that they rolled out a new feature, and the store UI was ahead of the backend that processed them. That is, they couldn't go live until every box had the new stuff installed, and were waiting. That's a stupid design process fail, not just a simple mistake, so let's assume hot fix. And hot fixes == fail. I'm not arguing they shouldn't be done, but that they do indicate something didn't go quite right. Labels: apple fail posted by ruffin at 8/01/2012 12:04:00 PM |
|
| 0 comments | |
|
This python script is awesome. I wanted to be able to line up several versions of the same file line by line through time to see what had changed from one version to the next commit... and the commit after that, and the commit after... Those kinds of changes are hard to eyeball with the standard git log -p, which just spits it all out like it's on a giant roll of dot matrix printer paper. This python script calls git and displays the last N number of revisions in vimdiff... which is awesome. Admittedly it's all command-line stuff, though you could change to make it gvim if you wanted, I'd imagine, and it's stuck in vim, whose diff is a little, well, stodgy, but all in all, a perfect fix to a bothersome problem. There's some room to improve, (I added... if N > 4: ... already, and will probably add a --range option to let you pick the 3rd through 7th versions of a file, eg) but this is a great tool for visualizing files stored in git. Labels: diff, git, stackoverflow posted by ruffin at 8/01/2012 11:01:00 AM |
|
| 0 comments | |
|
|
All posts can be accessed here: Just the last year o' posts: |
|||||||||||||||||||||
|
||||||||||||||||||||||
|
|
|
|