So the MongoDB courses are almost finished, and now both MongoDB for Developers and MongoDB for DBAs tracks are in the finals phase.

One of the questions is about indexes, where you’re given the list of indexes that exists for a collection, and an example of a query. The question is to identify which indexes could potentially be used for optimization for that query.

I had my ideas for the answer, but to be sure I wanted to create a sample collection, add indexes and view all execution plans. It is in fact doable, if you pass a parameter to the “explain()” command:

db.mycoll.find({your_query_params}).explain(1)
//these also worked in version 2.2:
db.mycoll.find({your_query_params}).explain(true)
db.mycoll.find({your_query_params}).explain({$all:1})

The output will include a field called “allPlans”, which is an array of all possible combinations of indexes that could be used. Neat.

Another quick and easy idea that’s great if you need to give gifts to a large group of people; give socks! Because who doesn’t love socks? And the love only increases with time, as shown on this highly scientific chart:

You will need:

Fuzzy socks (any socks will do, but I love super soft ones, also pastel or bright colors will look best). I got mine at Uniqlo – amazing quality and a steal at $10 for 2 pairs

I’m a huge fan of Wufoo. They made the annoying form-building/validation/emailing of confirmation/reports super easy. Anyone can build a form in a matter of minutes and run with it! Their system also supports payment integration with Paypal, Authorize.net and even Stripe. So it’s a no-brainer: use Wufoo and save yourself a ton of time.

I had to build a form for friend’s website (running hosted WordPress), where users can order items without the actual shopping cart functionality. So I went ahead, setup the Wufoo forms, customized the fields and design, and embedded the form via Javascript. All seemed good.

However, the order process turned out to be actually very custom (and some of the requirements changed), and as much as I tried to bend this form within Wufoo to do what I needed, it just wasn’t enough: there were a lot of custom calculations with Javascript and that required re-building the form using the API. So I wanted to share some tips on customizing a Wufoo form within WordPress.

First, set up a new page template in WordPress as you normally do.

Then, create your form in Wufoo, so all the form and field information is captured and saved within the Wufoo system. You will be using the API to pull field names and such.

Next, in the Wufoo dashboard, click on “Code” link which will take you to the code manager screen. In the top right corner you’ll see the “API information” button, clicking on which will give you the API key. Copy it.

Now that you have fields, you can create your page output as you desire, add custom functionality, and don’t forget to test.

This seems like still coding a good chunk of functionality, right? Well, yes, but you don’t actually need to do validation, reporting, payment processing and such, so it’s still less that you normally would do, if you coded everything from scratch. Also, admins will be making updates right in the Wufoo dashboard, so they won’t be touching the code or asking you to change copy for fields. As long as they save their changes, they will be dynamically pulled into the form on WordPress.

I have a funny story to tell first. It was my first year working at the agency, so during one of the client calls we were discussing an idea for a holiday app. It had to evolve around holiday sweets, and the client did not want to do cookies (because – duh, everyone does cookies!). One trend that just came out around that time was cake balls. But you know, cake making can be too time-consuming. So everyone started to throw around ideas, and lo and behold, someone blurted: “What about cookie balls?” And so the cookie balls were born!

It is now a real thing, where you crush cookies and glue them together into yummy goodness using cream cheese. The fun thing about them, you can make different flavors, colors and toppings, and it’s like a tenth of the effort compared to cake balls!

So here you go: cookie balls that make a great gift to bring along to holiday parties.

And for some of us, it’s time to prepare gifts for big family parties. Gift giving is fun, but figuring out what to get can be stressful. Also, it’s always appreciated if you bring something made by hand, and I love crafts, so I try to find quick and easy DIY projects that can be put together in a few hours.

I want to share an idea from a couple of years ago, hope some find it useful!

*The choice of magazine ad is here only to demonstrate the pretty pattern, nothing else

Steps:
– Select paper (can be from old magazines like I had) with pretty colorful patterns
– Using the hole puncher make a bunch of round little circles
– Take cabochons and glue the round circles to the flat part, so that your pattern faces the cabochon surface
– Glue the round magnet to the bottom side of your magnet
– Let the glue set
– Put your magnets into a pretty clear box and add ribbon/wrap as desired

Super easy and fun gift to make, and you can be sure it will be used – because who doesn’t have stuff hanging on their fridges?

*Aren’t these cute and awesome?

If you think it’s too tiny to be gifted by itself, add a nice box of chocolates and/or a bottle of wine. Tada! High five to you who just did all the gifting and had fun!