Normally I comment out lines in a Windows batch script by prefixing them with “::”—it just looks better to me than “REM”. But today I found out the hard way (of course) that you can’t do that inside an IF block, or the script dies with…
The syntax of the command is incorrect.
I’ve often been confused and frustrated by conditionals ( … ? … : … ) in SSIS expressions. The concept is straightforward enough, but the syntax made it really hard for me to keep track in nontrivial cases. Then yesterday I had an epiphany: it’s much easier to keep them straight if you write them on multiple lines. Continue reading “SSIS Conditional Expressions (Lightbulb:On)”
I just ran across this great bit of advice I got back in 1995 from Larry Wall, creator of Perl:
Don’t get brainwashed by your education into thinking that all the answers have to come from teachers.
I’m experimenting with a new kind of post, where I simply make a connection between two or more ideas, usually with little or no commentary. Here’s the first one:
Ed Felten, yesterday: CALEA II: Risks of wiretap modifications to endpoints
Today I joined a group of twenty computer scientists in issuing a report criticizing an FBI plan to require makers of secure communication tools to redesign their systems to make wiretapping easy. We argue that the plan would endanger the security of U.S. users and the competitiveness of U.S. companies, without making it much harder for criminals to evade wiretaps.
Me, in 2010: Internet Wiretap Bill Misses the Mark
So if this bill becomes law, it will accomplish precisely the opposite of its stated purpose. The government will still be powerless to eavesdrop on criminal and terrorist communications. Meanwhile, the good, honest citizen will be rendered powerless as well.
I have had a thought.
This is the content thereof.
Organizational culture emerges from the process of answering questions. The answers aren’t necessarily articulated explicitly, but they’re expressed in the decisions people make, the way people treat each other, and in so many other ways. Organizational leaders may be unconsciously undermining the very culture they’re trying to create, but they can’t change it until they start asking the right questions. Continue reading “Better Questions”
When Steve Gibson talked on Security Now 398 about how few users’ Java plugins are actually up-to-date, this question hit me:
Should browser plug-ins have built-in expiration dates?
The problem with having all of these old Java versions running around is that attacks always get better. How much more sophisticated are the attacks of today than the attacks of just one year ago? Why, then, should anyone think a free browser plugin released today—even if it’s secure by today’s standards—will stand up to the attacks of one year from now?
Fix the ecosystem…
Of course, vendors need to continue to do their best to write secure code in the first place, and release timely updates to fix errors that do make it into the wild. We also need to work on the ecosystem to make it easy for users to stay current—figure out what Apple is doing right, what Android is doing wrong, and how to apply those lessons to the browser plugin market. (I’m not just picking on Java—I’m thinking of Adobe Flash and Reader, too.) I’m not sure how to get end users to care about keeping these plugins up-to-date, but the problem deserves attention. Obviously, the major plugins now auto-update, which will help, but it’s not foolproof (I’m envisioning malware that intercepts update checks to keep vulnerable plugins in-the-wild longer).
…and build in a time limit
What I’m proposing is that vendors build in an expiration date as a safety net, so if a user tries to run a 12-month-old plugin (which won’t happen if auto-update is working and the vendor is still maintaining the product), it displays an expiration message and instructions for how to get a new version. Obviously this doesn’t solve our current problems, but it should be part of a strategy to make sure we’re not still in the same boat a few years from now.
I’ve learned a lot over the past several weeks, and at times the learning curve was steep, partly because I couldn’t find a good reference application that I could learn from. To-Do apps are the classic example, but they’re too trivial to demonstrate how to architect a larger application. I’m hoping this resource will help fill that gap.
I’m still learning this stuff and am certainly no expert, but I’m happy to share what I’ve learned.
Yesterday’s lesson in bug hunting: don’t assume you’re an idiot. I spent a few days trying to figure out why my success callback wasn’t being called. It had been working before I updated to jQuery 1.9.0, and I didn’t think I had changed anything. After much head scratching I found out that jQuery 1.9.0 introduced an Ajax() bug where HTTP status 204 is considered an error. A fix is in the jQuery master branch and will be in jQuery 1.9.1.
Today’s lesson in bug hunting: don’t assume you’re not an idiot. I spent hours yesterday and this morning trying to get Mousetrap.js working. I triple-checked my code against Craig’s documentation, verified the library was loading in the browser, etc. It should have worked. But I set a breakpoint on the line that was throwing the error and there was simply no Mousetrap in the global namespace. Having ruled out an error on my part, in desparation I opened mousetrap.js, hoping to find the bug in there. Instead I found… nothing. Yep, something had gone wrong when I downloaded it, and the file was completely empty.
Bottom line: keep in mind that everyone makes mistakes.
I wanted to GET a lot done today:
/coding, /writing, &more;
But try as I might, I got 302,
and /time returned 404.
I launched a new intranet application today. Nothing fancy, just a simple app to address a real need in my organization. Initial feedback has been very positive. Feels good to ship!
In light of recent events, I wondered if anyone was making a connection between gun control and the regulation of strong encryption. So I googled it and found that someone had: me, two years ago.
Related: why do so many news reports use the term “gunman” (emphasizing the noun; Google News has 2.49 million results in the past week) instead of “shooter” (emphasizing the verb; 216,000 results in the same week)? I think I know the answer.
I recently made a salad that everyone in my family loved so much we made another batch the next day. I don’t have precise measurements, but this will get you started:
- 12 ounce can white tuna, drained
- A decent squirt of ranch dressing (enough to bind the tuna together, but not enough to make it runny, maybe ~ 1/4 cup)
- ~1/2 cup shredded cheddar cheese
- 4 Chopped green onions
- Chopped basil
- Chopped parsley
- Chopped mint
Combine the above ingredients, then toss with:
- Chopped tomato
- Chopped Granny Smith apple
- Mandarin orange sections (canned or fresh)
- 1 bag salad mix (whatever floats your boat–I used this kind)
Tip: chop the tomato and scoot it onto a folded paper towel and let it sit while prepping the other ingredients—the paper towel will soak up a lot of the juice so it doesn’t make the salad all soggy.
Note: I used dried basil, parsley, and mint (this was originally a spur-of-the-moment idea), but fresh herbs would be even better.
That’s about it—simple and tasty!
Heads-up! In MySQL,
WEEKDAY('2012-11-09') = 4 (0-6 starting on Monday), but in SQL Server,
DATEPART(dw,'11/09/2012') = 6 (1-7 starting on Sunday). If you’re extracting data from MySQL to load into SQL Server, the correct translation is
If you’re not asking the right question, then there is no correct answer.
Merlin Mann in Back To Work #41
Here’s another product parody Lars and I did in college: Washingsoft UAnix. This was born out of our frustration with the way the University of Washington had—shall we say—embraced and extended standard Unix functionality.
Aaahhh, the joys of Photoshop and free time. I just stumbled on this little trip down memory lane—a parody of a Microsoft Office box that my roommate (Lars Blacken) and I did in college.
To force IE to edge mode (even on intranet sites, where IE would otherwise use compatibility mode), the server needs to send X-UA-Compatible as an HTTP header. Using a meta element in the document head doesn’t work reliably.
I found the answer buried in this Stack Overflow thread.
In my case, I was working on a WordPress theme, so I added
at the top of header.php.
You can also do it at the web server level with Apache or IIS (I haven’t tested either of those methods).
UPDATE 3/13/2014: I have now verified the IIS method linked above.
When I wrote about my experience setting up AD Single Sign-On for Linux, I said the next step was to extend the transparent SSO experience into WordPress. The biggest reason for that—I thought—was so that the WordPress server could then impersonate the logged-in user to pull resources from our SharePoint server (using SharePoint Web Services) and include them on WP pages. Basically a WordPress front-end with SharePoint doing some Digital Asset Management duties on the back-end.
The epiphany I just had is that it wouldn’t be WordPress connecting to SharePoint, it would be PHP, which already knows who the user is, thanks to the Kerberos authentication I already have set up. I don’t need to tackle the WordPress part before I can build the SharePoint part.
Transparent SSO to WordPress is a benefit mainly for content creators, editors, and admins—those are a small percentage of my total user base, and managing their accounts is relatively easy.