gordon.dewis.ca - Random musings from Gordon

Subscribe

Archive for June 2014

Rain rain go away!

June 24, 2014 @ 09:57 By: gordon Category: Weather

It looks like we’re in for some (potentially) exciting weather today:

TAF CYOW 241138Z 2412/2512 16008KT 6SM -SHRA BR SCT008 OVC015 TEMPO
2412/2414 4SM -SHRA BR BKN008 OVC015
FM241400 19010KT P6SM -SHRA BKN030 OVC080 TEMPO 2414/2418 5SM
-SHRA BR OVC020
FM241800 20010G20KT P6SM SCT020 BKN060 TEMPO 2418/2423 5SM -SHRA
BR BKN020 OVC050 PROB30 2418/2423 VRB15G25KT 2SM TSRA BR BKN020
OVC030CB
FM242300 20010KT 5SM -SHRA BR OVC020 PROB40 2423/2503 VRB20G30KT
11/2SM +TSRA BR BKN006 OVC020CB
FM250300 35005KT 3SM -SHRA BR OVC006
FM250600 01005KT 3SM -DZ BR OVC006
RMK NXT FCST BY 241500Z=

Rain with periods of rain (just to be different!), gusty swirling winds, possible thunderstorms, and drizzle. Whee.

Conditionally executing external code in SAS

June 23, 2014 @ 16:45 By: gordon Category: Programming, SAS

I use SAS fairly regularly in my job. I’ve taken a number of SAS programming courses, yet I don’t get to use much of what I’ve learned because the manner in which I use SAS is fairly basic. (A lot of SAS courses seem to use examples that don’t really relate to my work, such as business processes, evaluating credit scores and so on. I do a lot of statistical analysis of survey microdata.)

In a program I’m enhancing, I want to execute some code in another SAS program based on whether a certain variable is set to a certain value. In most languages, such as Perl or C, you would put this in an if-then-else construct and you’d be done. Because of the procedural nature of SAS, with data steps and macros, it’s not that straightforward.

I did some googling on the basis that I can’t possibly be the only person wanting to do this (it turns out I’m not) and found a thread on this very topic in the SAS Support Community forums. Wading through the responses, I found a several different ways people suggested doing it; some people who couldn’t possibly envision why you’d want to do it; a couple who got hung up on the content of the programs that the original poster wanted to conditionally execute; and one answer that stood out from all the others in terms of its simplicity, which I’ve included almost verbatim below, with some comments for clarity. (more…)

Matt Young: Staying classy in defeat

June 13, 2014 @ 16:31 By: gordon Category: Current affairs, General

A friend on Facebook mentioned a tweet by Matt Young (@mattyoungpc), a local PC candidate who was not elected during yesterday’s election, that is worth mentioning for posterity’s sake in the event that when someone from the OPC party demands he takes it down:

https://twitter.com/mattyoungpc/status/477396930343878656

Classy, eh?

It’s been a while…

June 11, 2014 @ 16:29 By: gordon Category: General

I haven’t blogged about anything in the last couple of months. It’s not that I haven’t been up to anything, I’ve just been busy. Since my last blog post I’ve been to Toronto twice, rang handbells for the end-of-year concert (bells run from September to May for me), done some geocaching, taken some photos (see my Flickr feed) and started steering dragonboats several times a week. The Ottawa Dragonboat Festival is taking place in just over a week’s time, so I’m on the water Monday (twice), Tuesday, Wednesday (twice) and occasionally on other days to help out teams that need a steersman for a practice. As things stand right now, the only day this week that I’m not going to be on the water is tomorrow, but that could change.

Speaking of Thursday, please be sure to exercise your right to vote in Ontario’s election by voting for your favourite candidate or showing up at the polling place and declining your ballot. If you don’t vote for your preferred candidate because you want to “send them a message”, you don’t get to complain when they don’t get in and you’re upset. And if you don’t vote at all, or at least decline your ballot, you don’t get to complain at all.