Monday, December 30, 2013

Chromebook - Acer C720 A Month Later

After a month of using my Acer C720 I can say that I am one darn happy customer. Apparently I'm not alone.

Friday, December 27, 2013

Coffeshop Productivity

Saw this article on FastCompany...could not agree more.  Working at a coffee shop can be a very productive experience.  After you read the article, I have a few tips of my own.

Thursday, December 19, 2013

"Sinking" output

Bedrock is a templating language which means pretty much everything in your page is being output to the browser. Bedrock statements that are parsed and produce output, do so at the point where the tag has been placed. Makes sense...after all that's what a templating engine is supposed to do.

 Hi this is <var $name> from <var $company_name>.

So when you have a page that includes statements like:

<sqlselect "select * from customer where name like ?" --bind=$input.q>
  <li><var $first_name> <var $last_name></li>
</ul> the middle of your page, you might be surprised to see a lot of white space in the output.

That's because, while Bedrock interprets the tags and does not output anything as a result of non-output tags other than <var>, the Bedrock statements are on lines that include a new line and Bedrock dutifully outputs anything in your page that is not a tag.

One way to avoid this, is to avoid placing these tags on their own line.  Another way of eating white space is to use the sink tag.  Take this group of statements:

<null:foo $>
<if $foo --eq "bar">
  <null:baz "buz">

Bedrock will interpret these tags, but your output will contain 4 new lines.  Using the <sink> tag you can eat all of that white space.

<sink><null:foo $>
<if $foo --eq "bar">
  <null:baz "buz">

The <sink> tag can scoop up the contents of the output in a variable as well.

<sink:hello_world>Hello World!</sink>

<sink> has one other magical property. It can also output the contents of the block to a handle.

<sink $fh>Hello World!</sink>

You can even nest <sink> tags.

<sink:foo>bar<sink>this is a comment</sink></sink>

Check out this link for more detail about the sink tag.

Monday, December 16, 2013

Chromebook - Acer C720 Day 20

Still loving my Chromebook!  No change on my VPN woes yet, but I'm fairly confident my network ninja at corporate will figure it out.  In the mean time I continue to read the Google Chromebook forums trying to learn about it and what potential issues people have.  I was able to help someone who thought they had a Chromebook issue, but it was more than likely a problem with their Comcast router.!category-topic/chromebook-central/chromebook/KrJeHbucaMg

Most of the problems I see that people have are because they do not understand what a Chromebook is.  There have been some reported hardware issues, but I suspect that those are few and far between and easy to spot and correct (send it back to Amazon if you we smart enough to order it from there!)

As mentioned in the forum link above my Linksys router DNS caching bug was vanquished by using Google's nameservers which is an option in the Chromebook's network setup.

Monday, December 9, 2013

OpenBedrock Moving to GitHub

Now that I've gotten the OpenBedrock project back in full swing, it's time to leave the stone age of CVS and enter the modern world by migrating to a more appropriate VCS.  I've debated the relative merits for this move, but in the end, in order to create a more community driven project, moving the project to GitHub and using git as my VCS makes a lot of sense.

While the world probably doesn't need another web application framework, and no one but I may ever contribute to it, I've always viewed Bedrock with a bit of fondness.   It was created in 1999 as a collaborative effort between myself and one other developer who initiated the concepts, to fill the gap that existed for a decent templating package.

Jay Sridhar's first effort, a C based package lacked the flexibility to rapidly change with the ideas we were generating, so Perl was adopted early in the project to make development easier and faster.  I think there was some thought of using Perl only as a prototyping platform, but soon production applications were being built in Bedrock.

Sunday, December 8, 2013

Chromebook - Acer C720 Day 12

Looking to hold a webinar on my Chromebook.  We've used AnyMeeting before to hold webinars for Treasurer's Briefcase, a Bedrock (and Perl) based website that offers small non-profits an easy way to do their record keeping .  AnyMeeting had worked well last year on my Macbook.   Because it used a Java plugin, it was difficult to initially setup for us as the hosts of the meeting owing to the constant Java security updates.  It was equally a pain in the butt for clients to use.  Since then they've ditched the Java plugin - Yay! - so I thought I'd try hosting a meeting on my C720.

Friday, December 6, 2013

Chromebook - Acer C720 Day 10

I had occasion last night to help a friend with a spreadsheet problem.  My friend emailed me the spreadsheet (.xlsx) and I promptly opened it with Google Sheets on my Chromebook.

Monday, December 2, 2013

Acer C720 - Update Day 6

Work-from-home setup
Acer C720, Samsung 2230
Logitech K750, Logitech Couch Mouse,
Fujitsu ScanSnap si3000
Technically, I've really only been playing with the Acer C720 Chromebook for 3 days.  I received the device on Monday, the 25th of November, but didn't really start the deep dive until Friday.  Since Friday though, I have used the Acer exclusively for doing a bunch of work including working on a PowerPoint (Google Slides) presentation for a talk I hope will accepted for the YAPC::NA conference in Orlando in June.

So far using the C720 has been fantastic!  I'm surprised at how little I actually need my Macbook Pro for the things I routinely do.  Some additional observations:

Sunday, December 1, 2013

New Bedrock AMI Released

Want to try Bedrock quickly?  Just released a new Bedrock AMI on Amazon's Cloud.  Follow the link below for instructions.

We'll Worry About Billing Later - Technical Debt

For years I have been trying to explain this concept to people in business that seem to want results now without fully understanding the costs of now.

Apparently there is a name for it.  I've sarcastically used the phrase "we'll worry about billing later", but it does have an official name -  technical debt - the bias of businesses to cut corners during the development or design phase in order to release a product as quickly as possible by deferring features, spending less time on building in fault tolerance, or perhaps scalability.

Friday, November 29, 2013

Acer Chromebook C720 Review

I just received my new Acer Chromebook.  After reading the reviews and checking it out at Best Buy, I pulled the trigger and ordered the $199 2GB Acer Chromebook C720.  This is the new Acer Chromebook based on the Intel Celeron with the Haswell Architecture.  The new Chromebook sports lower power consumption and better performance than the previous Acer C710. Here are my impressions of the C720 after a few days of working with it.

I'll cover some pros and cons, and give you some helpful tips.  For those unfamiliar with Chromebooks I'll discuss why you should consider a Chromebook instead of spending more money on a Windows laptop.  As a testimonial to what you can do with the Chromebook, I was able to write this blog entry completely using the Acer C720.  It allowed me to upload screen shots and even edit the pictures using the Pixlr app.

Saturday, November 23, 2013

Evaluating a Bedrock string

I sometimes forget how easy it is to do some things in Bedrock.  Take for example, evaluating a Bedrock expression.

 <pebble $expression>

So how do I create the Bedrock expression?  Ignoring the fact that evaluating strings in a web application is generally something you want to think carefully about since it has the potential to be a security hole, one could construct a string to execute like this:

<sink:expression --htmldecode>&lt;trace --output $env></sink>
<pebble $expression>

By enclosing the string you want to evaluate in a <sink> tag and essentially tricking Bedrock into not recognizing the Bedrock tags by using an HTML entity to start the tag (&lt;), the expression is simply stored as an HTML decoded string.  You can then use the <pebble> tag to execute the string.

In this case, there's not much of a security risk, since you are providing the string to evaluate. But consider:

<textarea name="expression" nrows="10" cols="60">
<var $input.expression>

<if $input.expression>
  <pebble $input.expression>

Allowing execution of arbitrary Bedrock statements is not something you probably want to do.

Sunday, November 17, 2013

AWS re:Invent 2013 - Las Vegas, NV

Quick impressions of AWS re:Invent

Incredible to see Amazon announce all the things that folks are clambering for.  Having said that, if it wasn't obvious before it should be by now.  We benefit from the new products that Amazon creates in two ways. First the amazing fully fleshed out products like their shopping experience, video platform, the new Amazon Workspaces, etc. and the underlying tools they use to create them.  Announcements of note:
  • Kinesis
  • Postgres
  • Amazon Workspaces
  • new instance types (bigger, faster, gaming support)
  • security features that integrate with corporate infrastructure
  • ...and more 
The other cloud players are so far behind at this point it begs the question whether or not Amazon will end up being a monopoly in this space and how will they use that position.  They have always been partners with their customers, so it will be interesting to see how things evolve as it becomes clearer and clearer that Amazon is not just the winner in the space, but may be the only viable player.

AWS CloudFormation - Tips for the Novice (Load balancing with no server affinity)

Look Ma! No Server Affinity!

In this blog entry I present the result of a weekend of messing with CloudFormation.  A load balanced, SSL enabled, Bedrock stack which has an RDS instance to hold session information.  I've removed server affinity requirements by using an RDS instance of MySQL instead of having each web instance implement their own server.

AWS CloudFormation - Tips for the Novice (How to perform a task once per launch - not once per instance)

Here's the issue - we want to launch a stack that includes an RDS database.  We only want to execute some process one time per stack launch, not for each instance.

AWS CloudFormation - Tips for the Novice (create a load balanced stack)

Creating a load balanced stack with ElasticLoadBalancer

Following up on the previous blog post on this subject, we now want to create a load balanced LAMB stack.  The ELB cost is currently $.025.hour.  Do the math:

.025 * 24 * 365 = $219/year

Seems expensive, however the upside is reliability and scalability.  One issue seems to be that the ELB instance does not necessarily handle spikey volume very well according to some reports.  What this means is that under rapidly increasing load, the ELB might not do a great job balancing the traffic.  There are ways to mitigate this however by something called "pre-warming" or apparently begging tech support at Amazon for help.  More research needed...

Saturday, November 16, 2013

AWS CloudFormation - Tips for the Novice (That would be me)

Lot's of talks this week at AWS re:Invent around automation, specifically using the CloudFormation tool, so of course I need to do a deep dive.  First some essential links:
Having four hours to kill between Las Vegas and Philadelphia I decided to start my CloudFormation journey.  I downloaded the CloudFormation docs to my Kindle and started to figure out how to use this product (not an easy task on Spirit Airlines, which has the most uncomfortable seats in the air!  I swear they must steal these seats from planes that have been junked in the desert).  My butt still hurts.

Friday, November 1, 2013

RPM Signing & Package Updating

I'm recording this info to the blog simply to help me to remember how to do this...again.


  • Generate a GPG key
  • Export a public key
  • Import a public key
  • Sign a package
  • Update the Bedrock repo

SSL Certificate Stuff

While mucking with creating an SSL enabled, load balanced, Bedrock stack I needed to create my own certificate and upload it to AWS.

Sunday, September 1, 2013

Welcome to OpenBedrock

OpenBedrock is a blog mainly about programming, specifically in the cloud, and more specifically about using Perl and Bedrock.   If you've never heard of Bedrock before, you're not alone.  It's YATL (yet another templating language) written in Perl that implements a web development framework.  Quick example to show you what I mean...

 <sqlselect "select * from customer">
    <td><var $name></td>
    <td><var $phone</td>

Hopefully, you get the gist.  If you want more info, visit the wiki - - there's a heck of lot more Bedrock can do.

The blog will contain lot's of other information regarding Perl, cloud computing, Linux and other hopefully useful tidbits.  I know they'll at least be useful to me.