The CSAA technical blog aggregation includes content written by BYU CS alumni and faculty . The views expressed by the alumni do not neccesarily reflect the views of BYU or the BYU CS Department. Objectionable material will not be tolerated. Report objectionable material to Mike Jones.
To add your technical blog to the aggregation, send mail to Mike Jones. Include the URL of the RSS feed, your name and graduation year(s).
It seems someone else noticed the resemblance between John McCain and Battlestar Galactica’s Colonel Tigh. It was a nagging worry, but then he selected Gov Palin to be his running mate. Well, she does have at least a passing resemblance to president Roslin from Galactica too.
So what is going on here? Now I get the impression that some of you out there think that Cindy McCain might look a bit like #6.
If you think that the Cylons are influencing top of the Republican ticket, you might want to check out this web site.
I always wondered if John McCain was a frakk’en toaster….
The system we're building at Kynetx includes a domain specific language that uses rules to create JavaScript programs that get sent down to the browser. I've documented our decision to use a domain specific langauge and our choice of Perl in other posts.
When I started this project, I was reading Mark Dominus' book Higher Order Perl and started using his HOP parser to play around with. One thing led to another an before you know it I had a full blown language parser in HOP without giving much thought as to whether or not I'd made the right choice.
I found the HOP parser to be pretty flexible, but it has it's quirks. More importantly, I didn't like the BNF specification format and so I was constantly trying to keep the spec and the implementation in sync. Better if I could just use the spec as the implementation 'ala Bison. Don't get me wrong, this is a great book with lots of wonderful ideas, but I wanted something else for the parser.
As I added more and more features to the language, it got to where I'd dread making the parser changes. Recently, I decided I had to significantly beef up the predicate expressions and thought it would be a good time to change out the parser as well.
A few months ago I picked up Christopher Frenz's Pro Perl Parsing in anticipation of just this day. Reading through it illuminted my choices and ultimately, I picked Damian Conway's Parse::RecDescent, a recursive descent parser over the other contender, Parse::Yapp. The reasons for my choice were partly esthetic and partly a trust in Damian. The main thing I was after was a parse spec that I could read and compile and RecDescent seemed great in that regard.
The biggest downside of RecDescent is that there's no associated Lexer. For most things that's not a big deal since terminals can be specified as regular expressions. The place where it really bit me was comments. Removing comments is trickier than you'd think because you don't want to process "start of comment markers" inside any quotes. With a lexer, that's easy, without one, it's more problematic. Writing the regexp to remove comments took me a while to get right. I ended up using a modified version of the solution given in this FAQ. The problem with most solutions, including Regexp::Common, which has a language comment module, is that they don't account for comment markers in quotes.
All in all, it was a good thing to do and I'm happy with the choice of RecDescent. Here's a sample production from my file:
decl: VAR '=' VAR ':' VAR '(' expr(s? /,/) ')'
{$return =
{'lhs' => $item[1],
'type' => 'data_source',
'source' => $item[3],
'function' => $item[5],
'args' => $item[7]
}
}
| VAR '=' 'counter' '.' VAR
{$return =
{'lhs' => $item[1],
'type' => $item[3],
'name' => $item[5]
}
}
| VAR '=' HTML
{$return =
{'lhs' => $item[1],
'type' => 'here_doc',
'value' => $item[3]
}
}
|
This production for decl has three alternates. Each has a separate return value (a hash) that represents the portion of the abstract syntax tree created for that part of the input.
If you decide to give Parse::RecDescent a try, here are some resources:
Reading the documentation and the FAQ thoroughly is highly recommended. There's lots of little tricks that can make your job easier.
My job, replacing an existing parser, was made easier by the fact that I'd previously built a pretty thorough test suite in Perl for the parser and some related modules. So once I got the language spec pretty much complete, I started running the tests and correcting errors as they cropped up. In a few hours, I'd solved all the problems and was confident my parser was ready to go. Definitely the way to go.
At any rate, now I've for a shiny new parser that I can go modify. Fun!
Today’s New York Times reports that the US government plans to take over Fannie Mae and Freddie Mac:
WASHINGTON — Senior officials from the Bush administration and the Federal Reserve on Friday called in top executives of Fannie Mae and Freddie Mac, the mortgage finance giants, and told them that the government was preparing to place the two companies under federal control, officials and company executives briefed on the discussions said.
The plan, which would place the companies into a conservatorship, was outlined in separate meetings with the chief executives at the office of the companies’ new regulator. The executives were told that, under the plan, they and their boards would be replaced and shareholders would be virtually wiped out, but that the companies would be able to continue functioning with the government generally standing behind their debt, people briefed on the discussions said.
It is not possible to calculate the cost of any government bailout, but the huge potential liabilities of the companies could cost taxpayers tens of billions of dollars and make any rescue among the largest in the nation’s history.
I can’t say I’m surprised. I spent two years as a senior IT consultant at Fannie Mae in the late 1990s, and it was clear even then (and even from my position) that there were some serious disfunctionalities within the organization. Most notable was the drive by top management to achieve (at almost any cost) double-digit growth in earnings, year over year, each quarter. It was a mindset that permeated the company. It helped drive the stock price up from just over $30/share when I arrived there in 1996 to nearly $90/share in 2001 (here’s an interactive stock price chart), and with good reason: Fannie was highly profitable (if I recall correctly, on the order of $1 million in profits per employee per year [before taxes] while I was there in the late 90s).
However, growth like that is hard to sustain quarter after quarter, year after year. The effort to do so appears to have led to the fradulent bookkeeping that eventually got Fannie Mae in trouble a few years back and cost CEO Frank Raines his job. I suspect it also led to Fannie’s flyer into subprime mortgages, which has led to massive losses and the collapse of Fannie Mae stock prices down into single digits (just over $7/share this morning, pre-opening). And now it’s led to the US government taking over Fannie Mae, and a massive bailout by the US taxpayers.
Ouch. ..bruce w..
P.S. I suspect my co-blogger, Bruce Henderson, may have more to say on the matter. Or maybe not.
Purple Avenger (at Ace of Spades) posted the following video. Avenger’s not sure if it’s real or a parody, neither am I:
This post over at Reason says that “Syndee L’ome Grace” is a real person, and her name certainly does show up via Google.
But . . . sheesh. ..bruce w..
I used to be a believer that when a good idea came around you should throw it on the backlog. Those ideas (or bugs) live on the backlog indefinitely waiting for their chance to "dance". As I re-evaluate my thinking from a Lean perspective I am reconsidering that approach. In Lean maintaining large amounts of inventory (queued inventory) is frowned up. Without going into all the gory detail of Lean (if you are an Agilist, want to be an Agilist, or develop software go read about Lean and think about it in terms of your software development process - it will be good for you) large amounts of inventory lead to "inventory rot". In the software world this amounts to requirements that were scoped two years ago by a Business Analyst that is no longer around or a bug reported by a tester two releases ago. The information relevance in those backlog items has dropped considerably during the time that they were idle. As time goes on and it becomes obvious that prioritizing them won't happen - close them. Dump them. If they are important they will show up again.
In addition to trimming the backlog appropriately it may make sense to have tiered backlogs. There will be a Sprint backlog (or Iteration Plan) that represents the work in flight. It is useful to have an "on deck" backlog that represents the work coming up in the next 6 months or so. The "long range" backlog represents those ideas and concepts that are more "out there" and likely are fairly vague, large, and inestimable. Each backlog requires different types of care and feeding and involves different sets of people in the care and feeding process. The Sprint backlog is the focus of the team, talked about in Standup as people report progress, and the tactical focus. The On-Deck Backlog should be actively worked by the Business Analyst, Customers, Technical Lead/Architect, and Project Manager. Perhaps this is a weekly, bi-weekly, or monthly meeting. The Long Range backlog is likely discussed perhaps monthly or quarterly as needed to identify items ready to move on-deck and be fleshed out, identify new directions that need to be captured, and obsolete ideas that are no longer applicable (don't forget this one!).
With bugs I subscribe to the Broken Window theory. The more you have the less likely you are to care. You have to be careful with that of course - take it too far and you end up with a product with no bugs, but no features either because you have spent all your time fixing bugs that weren't important. Once a bug has been identified as costing more to fix than it is worth you start to have a case for closing it and dropping it off the bug backlog.
The goal is to make sure your focus is where it needs to be. Your Sprint Backlog efforts should be focused on execution. Moving those items through the development process as effectively as you can. On-Deck Backlog efforts should be focused around locking down the requirements for the items so that they are ready to be executed on (a blog on how critical it is to do requirements definition is in the works). The Long Range backlog efforts should be focused around making sure that you have outlined the key strategic elements for the future and analyzing them in the context of the market you are serving to see what value propositions make the most sense to pursue.
Note: I use this blog to post both Personal and Technical articles. For a technical only feed use the following URL (http://bryanandnoel.spaces.live.com/category/technology/feed.rss). For a family only feed use the following URL (http://bryanandnoel.spaces.live.com/category/family/feed.rss) Technorati Tags: Agile,Backlog,Lean,Software Engineering
I had a developer ask me how to use Resources the other day. Honestly I had never used them for any production system and so I didn't know. So I decided to find out. Below is the code on how to do it in WPF and then after that how you would do it in Winforms. WPF
I borrowed a lot of this example from http://mostlytech.blogspot.com/2007/09/enumerating-xaml-baml-files-in-assembly.html. The article I link to showed how to iterate through Resources files that are in your solution with the Build Action set to Resource. I then use that to put an image on a button that alternates every time it is clicked. At http://forums.msdn.microsoft.com/en-US/wpf/thread/1bb025e8-a20a-43c4-a760-8666c63ff624/ it explains how to work with Resources that you define in the Resource tab in the Project Properties. You can also set an image directly in XAML as shown below
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Windows;
using System.Windows.Media.Imaging;
namespace WpfApplication1
{/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : Window
{private int ButtonClicks = 0;
List<object> EmbeddedResources = new List<object>();
public Window1()
{InitializeComponent();
Assembly asm = Assembly.GetExecutingAssembly();
Stream stream = asm.GetManifestResourceStream(asm.GetName().Name + ".g.resources");
using (ResourceReader reader = new ResourceReader(stream))
{foreach (DictionaryEntry entry in reader)
{ if (entry.Key.ToString().Contains(".jpg"))EmbeddedResources.Add(entry.Key);
}
}
}
private void Button_Click(object sender, RoutedEventArgs e)
{ButtonClicks++;
ButtonImage.Source = new BitmapImage(new Uri(EmbeddedResources[ButtonClicks % 2].ToString(), UriKind.Relative));
}
}
}
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<Button Click="Button_Click">
<Image Name="ButtonImage" Source="Images/IMG_7680.jpg" />
</Button>
</Grid>
</Window>
Winforms
I didn't spend as much time looking at the Winforms side of things, but here is a snippet of code that can be used. Note that I set the Build Action for the Image file to EmbeddedResource because that is what all the examples said to do. Bitmap has an overload that allows it to resolve Resource References. The name of the resource becomes <Namespace>.<Path>.<Filename>.
pictureBox1.Image = new Bitmap(typeof(Form1), "Images.IMG_7680.jpg");
Note: I use this blog to post both Personal and Technical articles. For a technical only feed use the following URL (http://bryanandnoel.spaces.live.com/category/technology/feed.rss). For a family only feed use the following URL (http://bryanandnoel.spaces.live.com/category/family/feed.rss) Technorati Tags: WPF,Winforms,Resources,.NET
Courtesy of the ever-wonderful American Digest:
As Gerard Van der Leun says, “Any questions?” ..bruce w..
Word from SFGate that during Wednesday night’s speech by Vice Presidential nominee (Gov) Sarah Palin, several members of Code Pink, the fringe / loon troupe that likes to protest Marines, attempted to storm the stage. From SFGate:
On Wednesday, CodePink did it again, as co-founders Medea Benjamin and Jodie Evans hit the floor of the Republican National Convention here, unfurling banners and getting arrested in the process.
The two protesters had official guest passes, and managed to get right up to the podium near VP candidate Sarah Palin.
Just as the Alaska Governor hit the line in her speech about hockey moms, the two women, wearing pink slips saying ”Palin Not a Woman’s Choice,” both tried to unfurl a banner that proclaiming, ”We need a Peace VP.”
This raises quite a few concerns, not the least of which: how did these nuts get so close? Were the Secret Service aware of them? Sadly in this day and age, you have to wonder if someone as rabid as these people might be packing some kind of Al-Qaeda suicide vest to underscore their protest.
Given the track record of the Secret Service, I find some right-wing site’s reports that Obama big money backer Jodie Evans was running towards the stage a bit tough to believe.
Update - my dear wife informs me that while I was flying cross country (during the McCain speech), another one of these 60’s rejects tried it again during John McCain’s address to the convention.
Word to you folks - try to keep in mind that Gov. Palin is at times heavily armed. I would guess she is at least an adequate shot.
…comes from someone who doesn’t think highly of her:
It was that good. No, she’s not qualified, and the substance was thin, but my God — that was perhaps the greatest bit of political theatre I have ever witnessed. Her critics in the media and in the opposition may regret having piled on quite so enthusiastically, and with so little heed for who they hurt — or angered. Watching the tumultuous, ecstatic reaction in the hall, I was reminded of the famous words of the Admiral Yamamoto after Pearl Harbour: “I fear all we have done is to awaken a sleeping giant, and fill him with a terrible resolve.”
Heh. Hat tip to Mark Hemmingway at National Review Corner. ..bruce w..
US Magazine of course had its infamous cover story this week on Sarah Palin, titled “Babies, Lies, and Scandal”. Bradley Jacobs, the senior editor for US Weekly, has his head handed to him by Megyn Kelly at Fox News by virtue of the fact that she actually read the story:
Hat tip to The Jawa Report. ..bruce w..
Just got in today’s mail a letter from our son Jon, currently stationed in al Rutbah in Iraq; here’s the text:
=============
August 22, 2008
Mom, Dad..
I wanted to write y’all a quick letter while I’ve got some downtime here at the IP Station. It’s now Day 50 of our deployment and so far things have been going relatively smooth. There’s only been one incident where I’ve had to bring my M4 up and take it off safe; each time never escalated any further than that.
No encounters with any IEDs, either, which is outstanding. But, even with that said, we’re rolling with a couple MRAPs (basically a 40,000-pound up-armored ice cream truck) when we drive to/from Rutbah & our outpost, so we’re good to go!
The main challenge is working with the Iraqi police. The majority of them are so apathetic to what’s going on or what’s expected of them that it’s almost impossible to get them to do something as simple as wearing their uniform properly, if at all. These guys are the laziest bunch of grown men I’ve ever worked with and they make over twice as much money as the doctors out here when half of them can’t even read or write. Not only that, but this entire town in tainted with corruption. The IP Chief, the mayor, the city council and the sheiks…it’s ridiculous, but it’s perfectly common out here.
I wish you guys could see this place…But, then again, I don’t. This town is trashed. Not just figuratively; I mean there’s literally human waste and garbage everywhere…dead goats, sheep, cats, and dogs outside people’s houses, in the alleyways, in the streets…It goes without saying, but it friggin’ stinks out here. The structures these people live in are in pretty bad shape, plus most of these families have no electricity. It’s sad to say, but ti’s just like what you might see on TV, only much more surreal when you’re out on patrol walking right through the thick of it. I’ve gotta hand it to ‘em for surviving the way they do with what little they have. It makes me that much more grateful for the things I have today and for everything you guys did to provide for all 40 of us kids as we were raised up.
Anyways…so everything’s fine out here. I hope the two of you are okay. I’ll leave my address below; if it changes I’ll be sure to let y’all know. There’s been rumor about us possibly moving to a different outpost around the end of the year, but it’s nothing official, so…we’ll see.
Anyways, we’re gearing up and getting ready to roll soon so I’ve gotta go. I miss and love you both. Hope to hear from you soon.
Your son, Jon
LCPL Jon A. Webster
PTT 21 (AO Rutbah)
Unit 42741
FPO-AP96426-2741
===========================
I couldn’t be more proud of him. ..bruce w..
The title above is from a comment on a previous post. The graphic below is from Suitably Flip:
And while it’s true that Delaware has about 180,000 more people than Alaska, neither Obama nor Biden have ever been governor (or mayor) of anything. Plus, Alaska’s state budget (not to mention its government and infrastructure) [PDF] is a bit larger and more complex than that of “most towns” (to use the words of the commentor linked to above):
“Just for the record, Alaska’s FY2008 operating budget is $11.2 billion, and the state employs approximately 15,000 people.”
Yep. Lots of towns like that around. ..bruce w..
As reported by William Kristol over at The Weekly Standard:
McCain aides whose judgment I trust are impressed by Sarah Palin. One was particularly amused by this exchange: A nervous young McCain staffer took it upon himself to explain to Palin the facts of life in a national campaign, the intense scrutiny she’d be under from the media, the viciousness of the assault that she’d be facing, etc.:
Palin: “Thanks for the warning. By the way, do you know what they say the difference is between a hockey mom and a Pit Bull?”
McCain aide: “No, Governor.”
Palin: “A hockey mom wears lipstick.”
Heh. Tonight should be interesting. ..bruce w..
All courtesy of S. Weasel:
Sort of sums up my feelings, as do the next two (color versions of Stoaty’s early B&W graphic):
I’m going to put this one in my sidebar. Here’s the same graphic with a black border:
Heh. ..bruce w..
[with apologies to Averroes (aka Ab ‘l-Wald Muammad ibn Amad ibn Rushd)]
I have been a registered Democrat since turning 18 in 1971, though over the past 20 years, I have often wondered why. The best answer: every time I consider registering as a Republican, some major Republican (or group thereof) does something so profoundly stupid or appalling that I can’t bring myself to switch parties. My most recent reason has been the gutless, self-serving and self-defeating behavior of Congressional Republicans over the past 4 years.
But I digress. As a Democrat, I have over the past 16 years — since the nomination and election of Bill Clinton in 1992 — watched my own party define its ethical standards and behavior downward, committing virtually every bad act of which they constantly accuse conservatives (it’s called “projection“). I thought I had ceased to be surprised by both the viciousness and the sheer, rank hypocrisy of both Democratic leaders and much of the Left’s rank and file, not to mention their handmaiden, the mainstream media.
But this weekend has surprised even me.
The Democrats like to complain about “the politics of personal destruction”, even as they have mastered it (again, since Bill Clinton’s ascension in 1992). But the absolute frothing rage and vile, hypocritical and/or false attacks that have followed hard upon the announcement of Sarah Palin as the GOP Vice-Presidential candidate have left me appalled beyond words. The Left has shown once again that no one surpasses them at their willingness to utterly trash anyone — especially women and minorities — who defy or threaten them.
Here’s a simple thought experiement: suppose that Sarah Palin were a Democrat and had been chosen by Barack Obama as his VP candidate. Virutally everything that the Left is attacking Sarah Palin on right now would instead be touted as “real-world experience and understanding”, especially her time as mayor of a small town in Alaska. They would fiercly mock any criticism, however mild, of Bristol’s pregnancy; they would tout Sarah’s choice to keep Trig (their Down’s Syndrome child) as showing how much of a ‘big tent’ the Democratic party has; and they would shout to the heavens Palin’s reformist credentials, particularly her fight against corrupt Republicans in Alaskan government.
Sarah Palin’s only real sin is that she’s a Republican. And the sheer virulance of the Left’s reaction to her shows how utterly terrified they are of her. If she really were a poor choice, a desperate choice, a lightweight choice, the Democrats would rub their hands with glee and thank the political gods for such a dumb choice. They would simply let the GOP ticket fail on its own, taking the high road (assuming the Democrats even know any more what the “high road” is). But the vicious, over-the-top, incoherent rage of the incoherent Left shows that Palin is anything but a lightweight, anything but a poor choice. She is, they fear, a second Reagan, one shaped for the 21st Century. Their nightmare is that if McCain/Palin win in November, they may have lost the White House for the next 8 to 16 years.
So they have to destroy her, smear her name, build up a negative image of her and her family in the public’s mind, before anyone gets to know her. And this means passing the stupidest, most vile rumors; being profoundly (and hypocritically) anti-feminist and misogynist in their attacks against her and her family; and generally lowering their political ethics beyond even their usual Stygian depths.
I can no longer bear, in even a ‘DINO’ sort of way, to be associated with the Democratic Party; whatever hopes I had that Barack Obama may actually represent something new are gone, notwithstanding what I thought was an outstanding talk last week. And for all the stupidities of the Republican Party — past, present, and probably future — the selection and nomination of Sarah Palin gives me hope for the future of the GOP.
All this is why I’ve added a new ‘to do’ item to an already busy list for this week. I just downloaded a voter registration/change of information form, filled it out, and printed it; I’ll be mailing it to the Douglas County Clerk & Recorder tomorrow.
And for the first time in my life, after 37 years as a Democrat, I will be a Republican.
..bruce w..
[UPDATED 09/04/08 — 0654 MDT]
If you’re wondering, yes, I did mail off the updated voter registration yesterday; I’ll let y’all know when my new Republican voter registration card comes in.
In the meantime, enjoy this People’s Newswire Roundup regarding Sarah Palin. ..bruce w..
Doug has put code in place to post new IT Conversations podcasts on Twitter. You can follow the IT Conversations twitter account and see new podcasts as they're published (about one per day).
Tags: itconversations twitter
Doug has put together a Podtrac survey to help us understand what IT Conversations listeners listen to and who you are. We're really appreciate it if you could take a minute and fill it out. You may find some of the demographic questions a little intrusive, but remember it's anonymous and that information is extremely helpful to us when we try to find underwriters for shows. It will take you 5-10 minutes, but it's very helpful to us, so I hope you'll give us a little of your time.
Tags: itconversations survey
My review of Fatpipe WARP has appeared in InfoWorld.
I've had a Comcast cable Internet connection for years. Last year I got a shiny new fiber connection from Mstar. But rather than uninstall the cable connection, I asked FatPipe Networks if they'd be willing to let me perform an extended test of the company's flagship route clustering product, WARP.
WARP is a 4U, rack-mountable network appliance that allows up to three WAN connections to be aggregated without the need for complicated BGP (Border Gateway Protocol) routing configurations. The unit provides traffic load balancing over these connections, allowing both inbound and outbound traffic to take advantage of them. Being able to handle connections of varying speeds from different providers makes WARP a great choice for businesses seeking to add extra bandwidth and increase the reliability of their connectivity.
From Product review: WARP your WAN for performance and reliability | InfoWorld | Review | 2008-08-28 | By Phillip J. WindleyI eventually shut the Comcast connection down and now get by with the fiber connection (15 Mbps symmetric). But while I had it and the WARP set up, it was pretty cool to be able to push load onto one connection or the other.
Tags: infoworld networking fatpipe
From Creative Minority Report:
Hat tip to the always-worth-reading American Digest.
UPDATED 0854 MDT
OK, I ran across this photo of Palin’s parents in their home (from National Journal Hotline):
Heck, I don’ t hunt (or like to hunt), but this just cracks me up. I don’t know what’s more fun: having Sarah Palin on the ticket or watching the Left become absolutely unhinged. ..bruce w..