Megan Taylor

front-end dev, volunteacher, news & data junkie, bibliophile, Flyers fan, sci-fi geek and kitteh servant

post

IKEA Hack: LACK coffee tables with TROFAST drawers and SIGNUM cable management

That Guy I Married and I recently replaced an old, tiny sofa with the IKEA KARLSTAD corner sofa. It’s huge. So huge, that we realized there was a hidden cost: We had to replace our old coffee table as well.

We decided to get two of the ~30″ square LACK coffee tables. The couch is also our dining area, so really, the more table space, the better. These tables have a shelf about halfway down the legs, but we have two active cats. Anything we left on that shelf would be identified as not bolted down, and therefore a cat toy.

So we needed drawers on rails that would hold from the top, instead of the side or bottom.

Based on another hack I’d seen around, I knew the TROFAST drawers had a lip that made them pretty much perfect for this use. My husband picked up the STRECKET rails from the kitchen department, and after testing that the rail and lip were a match, we took them home with us.

One of the tables also has the SIGNUM cable management rack attached for wrangling laptop cords since we work on the couch a lot. At some point, we might spraypaint those bright green drawers. :)

January 4, 2012 | Comments Off on IKEA Hack: LACK coffee tables with TROFAST drawers and SIGNUM cable management | Categories: Posts | Permalink

post

Daily Summary

I read:

Got halfway through Radioactive: Marie & Pierre Curie: A Tale of Love and Fallout today.

Adaptive Design, Fixed Widths and Tablets

Move Your Story Right Along: The Elements of Style Rap

The output element

Taxonomies don’t matter anymore

The Internet Gets Physical

Why Is the N.Y.P.D. After Me?

Book Pickings

You knew the old Mozilla, meet the new Mozilla

RIAA: Someone Else Is Pirating Through Our IP-Addresses

December 21, 2011 | Comments Off on Daily Summary | Categories: Posts | Permalink

post

Daily Summary

I did:

Got all my boundary service code ready to go: made changes to finder.js, settingsoverride.py, and definitions.py. Added shapefiles. Didn’t have to look up git commands! John Keefe got an EC2 instance running for me, using Chicago Tribune’s GeoDjango image. I should be able to get the app up pretty quickly from here!

Baked another couple hundred cookies. Wrapped said cookies up for mailing to family and friends. Spent an hour at the post office. Hey y’all, you’ve got cookies!

I learned:

Installing GeoDjango is STILL a bitch.

I need to start a notebook on all my project stuff as I do it; I keep forgetting passwords and filenames and commands. (Been meaning to do this for a long time, have never managed to implement it.) Have notebook, will fill.

EC2 isn’t as easy to work with as it should be. Why is this prep stuff so hard?

I read:

The Defense Bill Passed. So What Does It Do?

In Which We Teach You How To Be A Woman In Any Boys’ Club

Building Social Software for the Anti-Social

Dear Internet: It’s No Longer OK to Not Know How Congress Works

December 19, 2011 | Comments Off on Daily Summary | Categories: Posts | Permalink

post

Daily Summary

I did:

Made like 200 cookies. My hands smell AMAZING.

Got two awesome books from my in-laws: Arguably: Essays by Christopher Hitchens and Radioactive: Marie & Pierre Curie: A Tale of Love and Fallout. Thanks Mom and Dad!

Attended two different birthday parties. Happy Birthday December people!

I learned:

Preheating the oven is not optional.

I read:

Dear Congress, It’s No Longer OK To Not Know How The Internet Works

Nerds and Male Privilege

December 17, 2011 | Comments Off on Daily Summary | Categories: Posts | Permalink

post

Daily Summary

I did:

Sent my first chain email since…no, wait, EVER. In my defense, it’s a recipe exchange. And BCC was used.

I learned:

I knew this already, but it should be repeated: Spider Robinson is AWESOME.

I read:

An Open Letter From Internet Engineers to the U.S. Congress

CHRISTOPHER HITCHENS, 1949-2011 Polemicist Who Slashed All, Freely, With Wit

My daughter, a cult guitarist, and how journalists can become semicompetent programmers, pretty much in that order

The nightmarish SOPA hearings

December #Jcarn Roundup

Problems and Opportunities in Government Data

December 16, 2011 | Comments Off on Daily Summary | Categories: Posts | Permalink

post

Introduction to Databases Statement of Accomplishment

Just got my statement of accomplishment from Jennifer Widom for the Introduction to Databases class!

Congratulations! You have successfully completed the free online offering of Introduction to Databases, offered October through December, 2011. To successfully complete this free online class, students were required to watch lectures, complete quizzes and automated exercises, and take a midterm exam and a final exam. According to our automated system, your scores on these components were as follows:

Quizzes: 57 out of a maximum of 67
Exercises: 69 out of a maximum of 71
Exams: 26 out of a maximum of 38
Scaled total (exercises doubled, exams tripled): 273 out of a maximum of 323

We thank you for your interest in studying databases, and for participating in our ambitious experiment to deliver quality educational content to a worldwide audience.

December 15, 2011 | Comments Off on Introduction to Databases Statement of Accomplishment | Categories: Posts | Permalink

post

Daily Summary

I did:

Figured out what changes I need to make to my boundary service JavaScript files.

Checked out this crazy Facebook Timeline biznass.

Poked around online programming classes. I think I’m gonna work on mastering JavaScript next. Or at least one of the libraries.

I learned:

Spiders can make more than one kind of silk, and have multiple spigots in their spinnerets. Spiders are awesome.

If I bring homemade toffee to work, people will eat it.

How to find New York State geometry data with Google’s geocoding API

I read:

NPR’s StateImpact project explores regional topics through focused, data-driven journalism
The network is taking the resources of a national news organization and applying them to the local level.

24 Ways: Extracting the Content
Use page tables to break Content down into content.

Dalek Smash Cake & Doctor Who-Themed Birthday Party

Create Stunning HTML Email that Just Works by Matthew Patterson
We really need to start from scratch with our email templates at work.

Multi-Device Web Design: An Evolution

December 15, 2011 | Comments Off on Daily Summary | Categories: Posts | Permalink

post

Intro to Databases: Online Analytical Processing (OLAP)

Two broad types of database processing
OLTP (Online Transaction Processing)
– Short transactions
– simple queries
– touch small portions of data
– frequent updates
OLAP (Online Analytical Processing)
– Long transactions
– complex queries
– touch large portions of data
– infrequent updates

More terminology
Data warehousing
– bring data from operational (OLTP) sources into a single warehouse for analysis
Decision support system (DDS)
– infrastructure for data analysis

“Star” Schema
Fact table
– updated frequently, often append-only, very large
Dimension tables
– updated infrequently, not as large
Fact table references dimension tables.

Example:
Sales(storeID, itemID, custID, qty, price) – Fact table
Store(storeID, city, state) – Dimension table
Item(itemID, category, brand, color, size) – Dimension table
Customer(custID, name, address) – Dimension table

Foreign keys into dimension tables are called dimension attributes. Other attributes are dependent attributes.

OLAP queries
Join -> Filter -> Group -> Aggregate

Performance
– inherently very slow: special indexes, query processing techniques
– extensive use of materialized views

Data Cube (a.k.a. multidimensional OLAP)
– dimension data forms axes of “cube”
– fact (dependent) data in cells
– aggregated data on sides, edges, corner

Fact table uniqueness for data cube
Sales(storeID, itemID, custID, qty, price)
If dimension attributes not a key, must aggregate
Date can be used to create key
– Dimension or dependent? dimension, but no table

Drill down
Examining summary data, break out by dimension attribute

Example:
Select state, brand, Sum(qty*price)
From Sales F, Store S, Item If
Where F.storeID = S.storeID and F.itemID = I.itemID
Group By state, category, brand

Roll-up
Examining data, summarize by dimension attribute

Example:
Select brand, Sum(qty*price)
From Sales F, Store S, Item If
Where F.storeID = S.storeID and F.itemID = I.itemID
Group By brand

SQL Constructs

With Cube
Select dimension-attrs, aggregates
From tables
Where conditions
Group By dimension-attrs With Cube
Add to result: faces, edges and corner of cube using NULL values

With Rollup
Select dimension-attrs, aggregates
From tables
Where conditions
Group By dimension-attrs With Rollup
For hierarchical dimensions, portion of With Cube

DEMO

Star Join

select *
from Sales F, Store S, Item I, Customer C
where F.storeID = S.storeID and F.itemID = I.itemID and F.custID = C.custID;

select S.city, I.color, C.cName, F.price
from Sales F, Store S, Item I, Customer C
where F.storeID = S.storeID and F.itemID = I.ItemID and F.custID = C.custID and S.state = ‘CA’ and I.category = ‘Tshirt’ and C.age < 22 and F.price < 25; Drilling Down select storeID, custID, sum(price) from Sales group by storeID, custID; select storeID, itemID, custID, sum(price) from Sales group by storeID, itemID, custID; select state, county, category, sum(price) from Sales F, Store S, Item I where F.storeID = S.storeID and F.itemID = I.itemID group by state, county, category; select state, county, category, gender, sum(price) from Sales F, Store S, Item I, Customer C where F.storeID = S.storeID and F.itemID = I.itemID group by state, county, category, gender; Slicing A query that analyzes a slice of the cube by contraining one of the dimensions. select F.storeID, itemID, custID, sum(price) from Sales F, Store S wher F.storeID = S.storeID and state = 'WA' group by F.storeID, itemID, custID; Dicing Slice in two dimensions to get a chunk of the Cube select F.storeID, F.itemID, custID, sum(price) from Sales F, Store S, Item I wher F.storeID = S.storeID and state = 'WA' and color = 'red' group by F.storeID, F.itemID, custID; Rolling Up select itemID, sum(price) from Sales F group by itemID; select state, category, sum(price) from Sales F, Store S, Item I where F.storeID = S.storeID and F.itemID = I.itemID group by state, category; select state, gender, sum(price) from Sales F, Store S, Customer C where F.storeID = S.storeID group by state, gender; With Cube select storeID, itemID, custID, sum(price) from Sales group by storeID, itemID, custID with cube; select storeID, itemID, custID, sum(price) from Sales group by storeID, itemID, custID with cube(storeID, custID); shows NULLs (ex: sales for store1, item1, any customer) Can create Cube table to query Cube directly gives pre-aggregated data select C.* from Cube C, Store S, Item I where c.storeID = S.storeID and C.itemID = I.itemID and state = 'CA' and color = 'blue' and custID is null; select C.* from Cube C, Store S, Item I where c.storeID = S.storeID and C.itemID = I.itemID and state = 'CA' and color = 'blue' and custID is not null; no summarized data With Rollup select storeID, itemID, custID, sum(price) from Sales F group by storeID, itemID, custID with rollup subsection of cube based on group by attributes best for hierarchical analysis select state, county, city, sum(price) from Sales F, Store S where F.storeID = S.storeID group by state, county, city with rollup

December 4, 2011 | Comments Off on Intro to Databases: Online Analytical Processing (OLAP) | Categories: Posts | Permalink

post

Intro to Databases: Recursion in SQL, Nonlinear and Mutual Recursion

Linear Recursion
R As (base query (not R) Union (removes duplicates) recursive query (one reference to R))

Example 1: Ancestors
ParentOf(parent, child)
Find all of Mary’s ancestors

Linear
with recursive
Ancestor (a, d) as (select parent as a, child as d, from ParentOf
union
select Ancestor.a, ParentOf.child as d
from Ancestor, ParentOf
where Ancestor.d = ParentOf.parent)
select a from Ancestor where d = ‘Mary’;

Non-Linear
with recursive
Ancestor (a, d) as (select parent as a, child as d from ParentOf
union
select A1.a, A2.d
from Ancestor A1, Ancestor A2
where A1.d = A2.a)
select a from Ancestor where d = ‘Mary’

Nonlinear (versus linear)
+ query looks cleaner
+ converges faster
– harder to implement
SQl standard only requires linear

Mututal Recursion

With recursive
R1(A1, A2, …, Am) As (query-1), – R2
R2 As (query-2), – R1
Rn As (query-n)

Example: Hubs and Authorities
Link(src, dest)
HubStart(node)
AuthStart(node)

Hub points to >= 3 Authority
Authority points to >= 3 Hub

with recursive
Hub(node) as (select node from HubStart
union
select src as node from Link L
where dest in (select node from Auth)
group by src having count(*) >= 3),
Auth(node) as (select node from AuthStart
union
select dest as node from Link L
where src in (select node from Hub)
group by dest having count(*) >= 3)
select * from Hub;

with recursive
Hub(node) as (select node from HubStart
union
select src as node from Link L
where src not in (select node from Auth)
and dest in (select node from Auth)
group by src having count(*) >= 3),
Auth(node) as (select node from AuthStart
union
select dest as node from Link L
where dest not in (select node from Hub)
and src in (select node from Hub)
group by dest having count(*) >= 3)
select * from Hub;

non-detirministic, not supported by SQL standard.

Recursion with Aggregation

Example:
P(x)
with recursive
R(x) as (select x from P
union
select sum(x) from R)
select * from R;

FAIL, disallowed in SQL standard

SQL Recursive With Statement
Extends expressiveness of SQL
– basic functionality: linear recursion
– extended functionality: nonlinear recursion, mutual recursion
– Disallowed: negative recursive subqueries, Aggregation

December 4, 2011 | Comments Off on Intro to Databases: Recursion in SQL, Nonlinear and Mutual Recursion | Categories: Posts | Permalink