Little 418


The resulting entity body MAY be short and stout

Catching up on Data Structures

I’m pretending to be a Computer Science professor this semester at Xavier of Louisiana. My office hours are always busy, and I spend much of them teaching students the mysterious art of the tech interview: the practice of implementing clever algorithms and data structures on a single whiteboard panel.

But… my last formal training in the topic was more than a decade ago, which is a long time in CompSci land. New techniques have been invented, and others have entered common usage. Many of them are compact enough for whiteboard representations, and current info is often worth a mention in an interview, even if you solve problems with more traditional techniques.

YouTube and MIT Open Courseware to the rescue! I’ve been watching Erik Demaine’s awesome lecture, and feel almost caught up!


Change Preorder Text on Storenvy

Storenvy is a great option if you want a free online store.
We’ve been using it for our geeky fashion business, Happy Nerdcore, for the last several months. It works great, but we had to do a little hax0ring to make it fit out needs.

Storenvy has a cool ‘preorder’ flag that you can set on inventory. It communicates to the customer that it will take a little longer to ship. We wanted to use this flag to indicate which items in our store were made to order, and hence would take longer to deliver.

Luckily Storenvy lets you add your own CSS to your store, so we hacked in our own text.

  • Go to Admin Panel -> Storefront -> Theme -> CSS Mode
  • Tweak this CSS to match your color scheme and desired text
/* Update category pages */
.product .preorder.flag.status {
  background-color: #FFF; 
  color: #FFF; /* match colors to hide old text */
  width: 130px; /* adjust width to fit new text */
}

.product .preorder.flag.status:after {
  content: "Made to order"; /* new text */
  position: absolute;
  top: 8px;
  left: 8px;
  right: 0;
  bottom: 0;
  color: #000; /* new text color */
}

/* Update product detail pages */
#product .preorder.status {
  background-color: #FFF;
  color: #FFF; /* match colors to hide old text */
  position: relative;
}
#product .preorder.status:after {
  content: "Made to order"; /* new text */
  position: absolute;
  top: 8px;
  left: 8px;
  right: 0;
  bottom: 0;
  color: #000; /* new text color */
}
  • Save, reload, and profit!

Resize Photos on an iPhone Without an App

You took a cool photo of an awesome street vendor hot dog and you want to share it, but you’re on 3G and your phone has an 8 megapixel camera. Or worse yet, you took a panorama that’s like 60MB.

The iOS photo editor has a crop tool, but no resize tool. You could install an app to resize the image, or you could follow these easy steps:

  1. Open your awesome photo in the photos app.
  2. Take a screen shot by pressing the power and home button at the same time.
  3. Navigate to the screen shot in the photos app.
  4. Crop the iOS user interface and black bars off of the photo.
  5. Share your new, much lower resolution photo. It yields ~250KB square photos and ~100KB panos on my iPhone 6.

This works, but it’s terrible

  • The screenshots are PNGs. PNG is a terrible format for photographs.
  • It leaves behind a couple 3MB intermediate images.

But hopefully it gets you out of a pinch!