|
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! |
|
| Wednesday, February 29, 2012 | |
|
from here: Well done. Labels: git posted by ruffin at 2/29/2012 06:11:00 PM |
|
| 0 comments | |
|
Targeting WebKit is not like targeting IE6 :: Encosia: Chrome may lack features, but it doesn’t poop on my code. Classic enough quote that it deserves to be shared. posted by ruffin at 2/29/2012 05:59:00 PM |
|
| 0 comments | |
|
Predictably Meta: Slides and code from “Build Your Own Programming Language with JavaScript” Hilarious. But so serious. And funny. I downloaded 'em to look at later. This is one of the guys responsible for JSONLint, the JSON validator. Labels: FUN, javascript posted by ruffin at 2/29/2012 10:32:00 AM |
|
| 0 comments | |
| Tuesday, February 28, 2012 | |
|
So I joined the Science Fiction Book Club (SFBC). I honestly can't remember why I went to their site. I was eyeballing the price of buying a just-released fantasy novel (currently only available as a hardback or hardback-priced eBook; it's the only series I buy at release right now), and ended up checking them out. I usually buy used online, but I've got a number of current books I'd like to read, and their offerings mesh up very well. (Admittedly, if I had it to do over again, I'd swap Terry Brooks for the new Umberto Eco.) As a quick search of the Internet reveals, SFBC printings are strange beasts. Their printing of the same book you'd buy elsewhere will be slightly smaller than what you'd find in Barnes and Noble (or your local, independent book store). The paper is slick, and feels somewhere between "Bible paper" and what you're used to at retail. For some reason, the SFBC versions have been deemed uncollectable, though I've no idea why. Seems rarity and condition would be the only characteristics that matter, but there are a number of guides online to help identify these "worthless" SFBC duplicates. And they are different books, I think, though their ISBNs match! Here are the reported dimensions for the same book from the SFBC listing and Amazon. ![]() ![]() Same number of pages, so I'm guessing it's just scaled down and printed on thinner paper (though thickness is only listed on Amazon's, I know the pages are pretty thin). Seems to be smaller and lighter, certainly, which has obvious advantages for items mailed directly to their consumers. They also are well-known for "omnibus editions", where they package two or more books from a series that's usually long since gone to paperback, making some hardback omnibus collections almost as cheap as buying the separate books used from Amazon or BetterWorldBooks.com or what-have-you. I've got a SFBC Asimov omnibus I bought used from Amazon to save on postage over buying the three books separately, and it's a decent reading copy. When it comes to SFBC entering the publishing game, it's difficult to guess the how and why. Is it really cheaper for the SFBC to pay for the right to print the books and ship rather than just drop ship or take ownership of the ones printed by the conventional publisher? Is there a sweet spot for book size that makes postage that much cheaper? And if it is cheaper to print the books this way, why doesn't Barnes and Noble (or, better yet, Wal-Mart with paperbacks) make a similar deal? B&N does print out of copyright classics; why not first run books? Or if it is printing plus postage, wouldn't Amazon print its own books? Certainly they have a better bargaining position with publishers than the SFBC, right? Would the SFBC be able to pull this off today if it hadn't been around apparently since 1926 republishing books in fancy leather versions so that folks could have literary props to display in their house? The deal the SFBC has reminds me a good deal of Amazon and B&N with eBooks. There, both places buy the rights to "print" in formats that don't look much of anything like the hardbacks. I know my phone makes books look just a touch different from what I normally read. SFBC just takes the eBook paradigm and applies it to, um, paper. In any event, since it's so danged hard to Google up anything about the SFBC (other than what I've already summarized and the random stuff they have on their YouTube channel), I figure I'll post about my experiences here. I'll put in a fancy topic tag of SFBC so you can see it all in one place. Maybe someone like me will Google it up and figure out all the things I wish I could've found out but couldn't before signing up. So far, the most important lesson is that, though it's not listed on their site anywhere that I can find, the danged books take up to 4 weeks to arrive after they're ordered (but see update, below), something I only found out after emailing customer service (which is surprisingly quick to reply; great job there). I've quickly gone from ordering four, maybe five books I really want to read (two of the five from my intro offer were on my next-to-read list, and two more I wanted to read soon), to having the books I want most to read held hostage by the mail and wondering what I could read for the next few weeks while I'm waiting. /sigh I mean, I knew that by the time I was done buying my required books that I'd've likely overpaid by $10-15 over getting the 5 intro books plus 4 required purchases used, but to compound that with the slow boat delivery is painful. UPDATE: Of course two days after I start complaining, BAM, the books are at my door. I'm surprised they would tell me I'm going to have to wait up to 3 weeks if it's going to pop up that quickly. So exactly a week after I order, here they are. Very nice. Still, I haven't been this excited about getting books, strangely, for quite some time. Probably because I'm "treating" myself to newly released books instead of my normal frugal used. That's how they get ya! Next time: How much did that introductory offer "save" me, really? posted by ruffin at 2/28/2012 08:54:00 PM |
|
| 0 comments | |
|
I should probably use QuickSilver to switch to apps too far down the Command-Tab line, but I don't. I Command-Tab 12 times like an idiot instead. We'll see if this cuts down on Command-Tabbing a little. Keyboard shortcut to Launchpad on OS X Lion|Imagineric: Launchpad is great for finding an application when I forget it’s name or isn’t properly indexed by Alfred yet. Labels: os x posted by ruffin at 2/28/2012 01:08:00 PM |
|
| 0 comments | |
| Monday, February 27, 2012 | |
|
version control - Git: how is a branch I'm not committing to ahead of origin/master - Stack Overflow: To see the commits you have in HEAD that are not in origin/master: I'm not sure that's ever The Right Way to use git -- or to program so badly that you'd rather blow it all up. But it could be useful if you've changed too much and need to build now. Interesting to know, though. Labels: git posted by ruffin at 2/27/2012 11:11:00 AM |
|
| 0 comments | |
| Wednesday, February 22, 2012 | |
|
select object_name from dba_objects where object_type = 'TRIGGER' and status = 'INVALID'; Labels: noteToSelf, oracle posted by ruffin at 2/22/2012 11:25:00 AM |
|
| 0 comments | |
|
Aka, "Where did all my changes go, and why does this trigger's creation only work in sqlplus?" Roland Bouman's blog: Oracle SQL Developer 1.1 Supports MySQL: Sorry, that was a PEBKAC (Problem Exists Between User And Chair) More on how autocommit works in Oracle from an Ask Tom segment here (from 2000! though last updated this month). I've always used SQuirreL-SQL when using Oracle to this point, and this hasn't been an issue. Very non-SQL Query Analyzer. Old habits die hardest, I guess. Labels: oracle, problem solved, SQL Server posted by ruffin at 2/22/2012 11:09:00 AM |
|
| 0 comments | |
| Friday, February 17, 2012 | |
|
How can I use Oracle SQL developer to run stored procedures? - Stack Overflow: I highlight it in the SQL*Developer Object Navigator, invoke the right-click menu and chose Run. (I could use ctrl F11.) This spawns a pop-up window with a test harness. (Note: If the stored procedure lives in a package, you'll need to right-click the package, not the icon below the package containing the procedure's name; you will then select the sproc from the package's "Target" list when the test harness appears.) Man, that's more difficult than T-SQL. I was supposed to be able to figure that out without help? Hello, non-intuitive. Why I can't just call or exec sprocName(param1, param2) and have it display results (even if via an outCursor) in the results window, I have no idea. Over 24k views for that thread, and it's only a year old. Aside: Hard to believe Joel Spolsky is responsible for this thing, not because he doesn't often have good ideas, but because he seems to almost have too many. StackOverflow is awesomez. Why Fog Creek doesn't have some mainstream software everyone uses quickly becomes the more interesting question. Is Spolsky just a programmer who is good at managing programmers writing software for programmers, but that's it? Labels: oracle posted by ruffin at 2/17/2012 12:07:00 PM |
|
| 0 comments | |
|
oracle - Problem with execute procedure in PL/SQL Developer - Stack Overflow: Calling stored procedures using execute as above is specific to SQL*Plus. In fact, SQL*Plus converts execute some_proc() into BEGIN some_proc(); END;... Labels: oracle posted by ruffin at 2/17/2012 11:34:00 AM |
|
| 0 comments | |
|
select * from ALL_CONSTRAINTS where constraint_name = 'YoConstraint' Had one that wouldn't drop when the table was dropped (with CASCADE CONSTRAINTS;), and had to go search to see where the constraint with the same name as the one I was re-building lived. Voila. (No, my constraint in production was not called 'YoConstrait'. That's yo' constraint name, not mine, okay?) Labels: noteToSelf, oracle posted by ruffin at 2/17/2012 08:57:00 AM |
|
| 0 comments | |
| Thursday, February 16, 2012 | |
|
Type this exactly, though you'll see something slightly different... :1,$ s/Ctrl-QCtrl-M/\r/g It'll look like... :1,$ s/^M/\r/g ... which is what we wanted, right? Labels: noteToSelf, problem solved, vim posted by ruffin at 2/16/2012 10:03:00 AM |
|
| 0 comments | |
| Wednesday, February 15, 2012 | |
|
Gruber at Daring Fireball does a heck of a job correcting the impression Walter Isaacson gives of Steve Jobs's philosophy of design: What Schiller is telling Isaacson is that prior to Jobs’s return to Apple, design was what happened at the end of the engineering process. Post-Jobs, engineering became a component of the design process. This shift made all the difference in the world. It's a well-nuanced piece -- one of Gruber's best, and that's saying something -- explaining Apple's success in becoming what Gruber calls not a software or hardware but an "experience company" . Awfully insightful, and worth reading. posted by ruffin at 2/15/2012 07:26:00 AM |
|
| 0 comments | |
| Tuesday, February 14, 2012 | |
|
There's just enough here that I'd like to be able to come back and not once again reinvent the wheel. The locking in particular is something I often overlook when I re-roll app logging. I made a couple of edits from my "real" code to this generic code, so I'll have to test and come back if there are issues. private static object _LogLock = 0; // needs to be at the containing object's levelLabels: c#, code, noteToSelf posted by ruffin at 2/14/2012 12:52:00 PM |
|
| 0 comments | |
|
Enumerable.ToDictionary(TSource, TKey) Method (IEnumerable(TSource), Func(TSource, TKey)) (System.Linq): class Package Oh, good heavens. Really? Lambda expressions? Obfuscationing weirds language. (In retrospect, that last sentence would potentially make for a better blog name.) Labels: c#, noteToSelf posted by ruffin at 2/14/2012 10:10:00 AM |
|
| 0 comments | |
| Saturday, February 11, 2012 | |
|
Just watched the trailer for the new Spider-Man. Looks a lot more like what I enjoy about the comic than the Toby Maguire version. Lots of bullet dodging, and maybe a little more non-supervillain head-knocking. I didn't see much of the Peter Parker self-deprecating humor, but I did see a lot of who I assume is Gwen Stacy, who everyone with any sense has always thought was, ultimately, a better match for Puny Parker than MJ. She really was wasted in the last version; hopefully the rebooted Gwen will be much more interesting. (Though having an actress known for having red hair and who, honestly, has a face that looks a ton like MJ did in the early comics play Gwen Stacy is ironic at best.) ![]() But what's best to see? The web-shooters are back! Like the canary in the coal mine, seeing a Spidey with some strange genetic mutation that makes webs come out of his wrists "naturally" always seemed wrong, even in light of the newer plot in the comic that Peter has more innate powers than we suspected (another shark jumping, honestly, if they don't handle it right). Still, having real web-shooters instead of compromising the working myth to be all timely and snizznet makes me feel the 'slinger is in better hands this time. Labels: Other Stuff, Spider-Man posted by ruffin at 2/11/2012 12:37:00 PM |
|
| 0 comments | |
| Friday, February 10, 2012 | |
|
Amitava's Technical Diary: Nesting ExtJS 2.0 TreePanel inside Accordian: Nesting ExtJS 2.0 TreePanel inside Accordian Was having some trouble getting a TreePanel to render as a child in another Panel in ExtJS 2.2. Bizzarre. It'd render if I'd put it directly into a DIV (renderTo set for the TreePanel) and the other Panel into another, but if I removed renderTo from the TreePanel and stuffed it into that other Panel, BLAMMO. ct is null. Enjoy. Lots of weird stuff in ExtJS. I've seen it act unhappy if you don't have an id set for an object. Now, maybe a header is occasionally assumed as well? /sigh Neat overall, but a little rough around the edges. Labels: ExtJS, noteToSelf posted by ruffin at 2/10/2012 04:46:00 PM |
|
| 0 comments | |
| Thursday, February 09, 2012 | |
|
Datatypes In SQLite Version 3: Note that a declared type of "FLOATING POINT" would give INTEGER affinity, not REAL affinity, due to the "INT" at the end of "POINT". Oh, well, sure. Wait... what? posted by ruffin at 2/09/2012 11:00:00 PM |
|
| 0 comments | |
|
SELECT * FROM all_tab_columns Enjoy. Labels: noteToSelf, oracle posted by ruffin at 2/09/2012 10:31:00 AM |
|
| 0 comments | |
| Wednesday, February 08, 2012 | |
|
CreativeTechs Tips: Can't Eject a Disk? Find Which Files are Open.: Put this all together, and you get this: posted by ruffin at 2/08/2012 10:44:00 AM |
|
| 0 comments | |
|
Determining if an object property exists | NCZOnline: //doesn't accurately test for existence In retrospect, he's only going Colbert on us twice, but it made me chuckle anyhow. I'd seen the truthy phrase before, but not used with quite so much unselfconscious aplomb. And I wondered about that shortcut check for existence. It looks like what I want is, indeed, if ('propertyName' in object), though hasOwnProperty() comes up again as well if you want an object-specific check. In other news, I'm over 2000 posts -- blogger says 2007. I've almost blogged my year. Sorta. Which answers the question: If over two thousand blog posts fall in the woods... Labels: colbert, javascript posted by ruffin at 2/08/2012 09:30:00 AM |
|
| 0 comments | |
| Friday, February 03, 2012 | |
|
array.contains(obj) in JavaScript - Stack Overflow: As others have said, the iteration through the array is probably the best way, but it has been proven that a decreasing while loop is the fastest way to iterate in JavaScript. So you may want to rewrite your code as follows: Speed savings because you're not checking i against a value. i against a.length requires a lookup each time. i against len, where len is precached with len=a.length still looks up len. This simply evaluates i. posted by ruffin at 2/03/2012 11:49:00 AM |
|
| 0 comments | |
|
Unfortunately I'm stuck on ExtJS 2.2 in a current project, so I'm not sure how well this carries over, but I've done a crudload of work looking though the code, extending Store, GridPanel, and JsonReader and creating a custom ColumnModel etc etc. And this is where I think I am with mapping the Store.load() to GridPanel lifecycle, pulled from some code comments: 1 //==============================================
2 // Use the reader to create the data store
3 //==============================================
4 // note that I've subclassed Store (as MyQueryDataStore) here.
5 // No operational difference in this code, however.
6 var myStore = new MyQueryDataStore({
7 url: './json/gridValues.json',
8 reader: myReaderTest
9 });
10
11 // How to iterate the data once it's returned, remembering that we're
12 // dealing with an asynchronous paradigm here.
13 myStore.on("load", function(s,rs) {
14 console.log("and we're back");
15 this.each(function(record) {
16 //var strFieldName = this.fields.get(3).name;
17 //console.log('record data from callback: ' + record.get(strFieldName));
18 });
19 });
20 myStore.load(); // AJAX call to get the data happens now.
21 // the Store is going to call the load method of its local
22 // HttpProxy...
23 // this.proxy.load(p, this.reader, this.loadRecords, this, options);
24 // ... the request sent to the server has a callback referenced to
25 // the store's loadRepsonse method, which includes a call to read
26 // the response with the referenced DataReader.
27 //
28 // Afterwards, the proxy calls the Store's loadRecords method.
29 // The already Read response is passed with that call as [o] in
30 // loadRecords' first parameter.
31 // loadRecords : function(o, options, success){
32 // ...
33 // var r = o.records, t = o.totalRecords || r.length;
34 //
35 // And voila. That's the life of a JSON return to DataStore request.
That's close, anyway. I'll clean up the custom objects at some point and post a tutorial, just to add to my other obsolete technology intros, like the Atari 2600 programming on an OS 9- Mac pages. One quick editorial comment: The "debug" version of ExtJS, at least at version 2.2, shows a programmer more interested in showing off than creating self-commenting code (though don't miss caveats one and two). If you're not going to comment your code, there's no reason to also obfuscate by hand and tell others (like at least one unhelpful dude employed by Sencha won't stop doing on their forums) that the answers to all your questions will be revealed not by asking for help when you're mentally exhausted (okay, some questions are horrible, but still...), but by forensic examination of ext-all-debug.js. This hand-obfuscation is exactly what you find in ExtJS. The best example I've found so far, unless I've missed something, is in JsonReader. From my flowerbox: * In Ext.data.JsonReader, for some reason, the equivalent variable in readRecords * for [fieldManager] (in that case, named [f]) was used to perform the tasks of both * [fldColumnArchetype] and [fieldCurrent] variables here. I think it's just an * obfuscation technique (like the reused [v] throughout), as the use here seems * to have no relationship with the original fieldManager declaration. That is, * you could have used [foo] in either spot if you'd wanted, but they strangely * and unintuitively recycled instead. (Or I've missed something important!) The * kingdom for a strongly typed language... * * There were other occurrences of poorly scoped variables and var choices, like... * var s = this.meta; // This var only made things *less* self-commenting. Gone. * ... that have been removed from the JsonReader codebase. It's like the code * had been minimally minimized and purposely obfuscated, but only partially so -- * and that obfuscation done by hand. And let's just say that variables named r,f,fi,fl,v,g are bad enough before they're reused without even a passing regard for typing. /end rant Labels: code, ExtJS, javascript, noteToSelf posted by ruffin at 2/03/2012 09:10:00 AM |
|
| 0 comments | |
| Wednesday, February 01, 2012 | |
|
Finally bothered to figure out what call() does, precisely, and why it needs 'this' passed in as an "extra" parameter. Great explanation here, in odetocode.com: var x = 10; So the deal is that "this" becomes the "new" "this" within the function, making it approximate a real object oriented overload. So if you're, say, extending some ExtJS objects in ExtJS 2, this is how you'd call the superclass' functions from the class' extension. So in Sencha's tutorial, you're first, very smartly, making a trivial extension of an existing object with code like this... initComponent:function() {So initComponent will do the same that it's always done, but will pull in the extended (though, for now, only trivially extended with no new functionality) object's methods, props, etc. when "this" is called. The whole Javascript revolution still seems like a giant kludge, but that obviously doesn't make it evil. It's a good hack, but takes a little head rethreading. Labels: ExtJS, javascript, problem solved posted by ruffin at 2/01/2012 10:03:00 AM |
|
| 0 comments | |
|
|
All posts can be accessed here: Just the last year o' posts: |
|||||||||||||||||||||
|
||||||||||||||||||||||
|
|
|
|