Monthly Archives: November 2016

ACM Hour of Code Dec 5-11

I am re-posting the ACM newsletter about thee upcoming Hour of code – please consider organizing something in your community!


Organize an Hour of Code in Your Community During Computer Science Education Week, December 5-11

Over the past three years, the Hour of Code has introduced over 100 million students in more than 180 countries to computer science. ACM (a partner of, a coalition of organizations dedicated to expanding participation in computer science) invites you to host an Hour of Code in your community and give students an opportunity to gain the skills needed for creating technology that’s changing the world.

The Hour of Code is a global movement designed to generate excitement in young people. Games, tutorials, and other events are organized by local volunteers from schools, research institutions, and other groups during Computer Science Education Week, December 5-11.

Anyone, anywhere can organize an Hour of Code event, and anyone from ages 4 to 104 can try the one-hour tutorials, which are available in 40 languages. Learn more about how to teach an Hour of Code. Visit the Get Involved page for additional ideas for promoting your event.

Please post activities you are hosting/participating in, pass along this information, and encourage others to post their activities. Tweet about it at #HourOfCode.

Leave a comment

Filed under events, news, Uncategorized

Using Postgres functions for reporting

Two weeks ago, when I was participating in the ORM panel I thought to myself that it has been a while since I’ve used Postgres functions to encapsulate some database functionality. And the reason for that was not that I am not really supporting the application at that time, but that I was trying to keep the structure of my data mart really clear and transparent.

There was one particular case where I knew for sure I should use functions instead of views, because I did have multiple views with identical logic which differ just by the state and the lender name. And I could not create  generic views and select from them, because in all those cases the condition won’t be pushed down.

But.. we were still validating results with our business stakeholders, and for some stupid reason I was thinking that I should wait till everything is final before converting. And then – I actually decided to convert to functions, because I could not stand a perspective of copying the same changes to four different places. And I did, and now I am thinking, why I was so stupid not to do it long time ago? I thought that it was not an immediate business need, but boy, how wrong I was!  It became so-so-so much easier to make the changes; also it turned out that Looker can work with the functions output just fine, no issues at all.

And as an extra bonus – since I always generate and execute dynamic SQL in the functions (for performance reasons), I do not need to recompile them when I need to change the underlying materialized views. No need to recompile 24 views! Isn’t it a relief?! Now I am thinking I should convert even more views to functions – as long as my team members are OK with that.

Leave a comment

Filed under Data management, SQL