Tuesday, January 24, 2012

New Tradition: The Grocery List. [The Grocery List]

Ed. Note: This is a post category I'm trying to start, as a form of public disclosure, listing items I bought at the grocery store, available publicly for your reference or critique.


Alright, since this is the first one of these, I haven't quite figured out how I'm going to do it all the time. I'll likely scan my lists, but for now, I'll list the items.

I think this is an okay start:

  • A green pepper & a yellow pepper
  • Sliced baby bella mushrooms (I'm lazy, sue me)
  • 6  apples 
  • Dozen eggs
  • An onion
  • A tomato
  • 1/2 Gallon Fat-Free Milk
  • Crumbled Feta cheese
  • Boatland Farms Strawberry / Banana Juice
  • Celery Sticks
  • Asparagus
  • A Cucumber
  • Garlic
My Plan
  • Apples for Snacks
  • Tonight: Orzo (package some up for lunch tomorrow with an apple, celery sticks, & sliced pepper to snack on throughout the day)
  • Tomorrow morning: Eggs and leftover tomato & onion with garlic
  • Tomorrow evening: Asparagus and mushrooms with chicken & garlic (with planned leftovers for lunch)
  • Glass of milk each morning

This is mainly my "keeping me honest" thing, but your thoughts & suggestions are always welcome in the comments.

Some Things I've Been Bad at, and What I'm Going to do to Change it.

Ed. Note: This is one of those weird public-disclosure blog posts. If you only come here for tech stuff, then move along; nothing to see here. :)

Ed. Note 2: This isn't a "new years resolution" post. It's an "I waited way too effing long to do this stuff already" post.

Ed. Note 3: I'm clearly my own editor.

I had an epiphany in the middle of the night last night. I realized two things simultaneously: 
  1. I suck at taking care of myself in lots of ways, and 
  2. in that regard, I'm very good at tricking myself by letting things become excuses.
Some ways in which I'm guilty of this:
  • I don't sleep enough. 
  • I don't eat well at all (or eat well enough regularly enough). 
  • I let tasks pile up. Not work things or big things, but little things. Laundry, returning a package, cleaning my room, buying supplies.
  • Don't even get me started on exercise. 
  • I let work fill in the cracks of my life because I feel responsible or it's necessary or it feels good/rewarding.
But overall, there was one major theme: instead of making time to keep myself healthy and take care of myself, I've been letting the bullshit of being "busy" take away too much from some important things. Generally, I havent' been respecting the time it takes to do these important things, and as a result have been trying to minimize them or shortcut them.

So I decided to knock it off. Cold turkey. I'm not phasing it in, because I've let "busy" distract me from the things I need to do for so long. I'm just doing it, and I'm going to do my best to stop making excuses not to do these things, because there is no excuse not to take better care of myself.

So, What am I Going to Do About It?
For Starters:
  • Quit Nutrisystem. Wait, what? This sounds counter-intuitive, I know. I've lost some weight on nutrisystem. But its' is full of sodium, processed, etc. etc. Most importantly in my situation, it became a crutch. I'd cram a bunch of Nutrisystem because I didn't have time. I'd stop buying fresh food and subsist on their food which is only half of what they tell you to do anyway. So I consumed too much of their food. The effect started reversing itself. And honestly, it just didn't feel natural. The combination of my methods and the food made me feel like I was eating food for machines. I want to eat food for people, because I want to be more of a person.
  • Not rushing to work and instead prepping for my day. I get to work earlier than most people every day anyway. But I wake up, rush, neglect breakfast, taking time to center myself, relaxing, etc. I love the morning, but I don't appreciate it nearly enough.
  • Replace my after-work Starbucks trip with an after-work trip to Giant. They're in the same damn parking lot, and yet I've been neglecting healthy food for its short-term energy supplement.
  • Buy fresher things. One technique I'm using is to attempt to spend all my time at Giant in the fresh food sections. If I don't stray too far from that except for items I know I need, then the stuff I discover should generally be better for me.
  • Plan meals better, and plan them for leftovers. I'm one dude. I need better organization for the food I make. I suck at this now, but it'll be a good challenge. For starters, I'll attempt to be packing a lunch before work every day.
  • Exercise 30 minutes a day. A bare-minimum requirement, but one I haven't been meeting.
  • Drink more water. I received a nice water vessel  for Christmas, yet I haven't used it. Ridiculous. It's 70% of my body but I've been drinking coffee like it's water. Only water is water.
  • Take vitamins. It's easy as hell to take a vitamin a day. 
But most importantly:
  • Hold myself to these things as publicly as possible. You'll be seeing more blog posts like these, with different themes. I hope you'll indulge me and feel free to comment if you see fit. Be critical, encourage me to do better things. See a better choice I could have made? Add your thoughts. I can fool myself, but I can't fool you smart people.
Well, now that that's all out in the open, let's start this adventure, shall we?

Friday, January 20, 2012

A Metaphor for SOPA / PIPA

I just thought it up -- taken from an e-mail response I just wrote to Al Franken:
"They would protect an stagnant industry that wants to pour its own cement shoes while complaining that the water is rising."
I think it brings home what the industry is doing to itself. By refusing to evolve and instead fighting innovation under the guise of lost profits (the battle over the VCR, anyone?), helping the industry with legislation is stopping it from helping itself.


Am I completely off base? Do you agree? I'd love to hear in the comments.

Monday, January 09, 2012

WMATA lies! (Or: "In which I make a mild deal out of nothing")

[Ed. note: I'm very much aware that this is not a big deal. Just having some fun with observations.]

Is it:


Or:


Get your story straight and then get back to me, WMATA.


Fix: Crystal Reports 2008: "Default printer is not available" and/or Un-expandable Collapsed Sections [Field Notes]

Issue
In Crystal Reports 2008, when opening up a report that came from elsewhere (usually another user's machine), I see "default printer is not available".

Oftentimes, this will be accompanied by a strange behavior that will cause reports (or subreports) to look completely collapsed, like the following image:


"Oh", you say to yourself, "I'll just expand those sections manually and carry on." Well think again, renegade -- Crystal Reports will have none of it. The sections appear frozen in place forever.

Your report sections. It is as painful as it looks.
Solution
Luckily, per usual, StackOverflow was a big help here.

This solution has two different parts -- you may only need one or the other, but I've found them both to be a pretty effective one-two punch in this situation.

Part 1: Change Your Printer Settings

  • While in the report, click File --> Page Setup...
  • Check the box labeled No Printer (optimize for screen display).
  • Check the box labeled Dissociate formatting page size and Printer Paper Size.
  • The box should look like below:
That should do it.



Part 2: Change Display Options
In case you have some sub-reports, etc. that didn't quite get the message to thaw out, bro, it's likely because they were hidden before or hidden as a result of the printer situation being screwy.

Try the following:

  • While in the report, click File --> Options...
  • Click the Layout tab (usually visible by default in my experience)
  • In the Design View section, check the "Show hidden sections" option. This will cause any unwieldy sections to fall in line and become visible.

Tuesday, December 27, 2011

FYI -- Potential downtime

Just a quick note: I'm transferring some domains away from GoDaddy (a long time coming), and this is one of them. If you experience some downtime while I wait for things to switch over, I apologize, but we'll be back up and running soon.

Wednesday, December 21, 2011

Plaintext password offender: Yankodesign.com

I recently created an account at Yanko Design (they have some neat stuff I wanted to further explore).

The welcome e-mail I received was as follows:

Yep, that's my password, in plaintext. Luckily I used a throwaway, but still, come on. What's it going to take for merchants and e-commerce platforms to do better than this?

Monday, December 19, 2011

How To: Insert Group Name Text into a Crystal Reports 2008 Section [Field Notes]

Problem
I accidentally deleted the group name text from a section of my Crystal Report in Crystal Reports 2008, and now I would like to re-insert the text.

Solution
This is embarrassingly simple, and yet I found it to be surprisingly counter-intuitive. Maybe it's just me..

In the Field Explorer section, expand the "Group Name Fields" section and drag the name onto the report.


It's not under insert, not as a menu shortcut, etc. -- as far as I can tell, the only place to drag a Group Name field from is there.

How To: Toggle Fields in a Crystal Report Based on Whether Records are Returned [Field Notes]

Problem
In a Crystal Report, you would like to show or hide sections based upon whether the report contains results or not.

Solution
Step 1: Create a Shared Variable and Increment it

  • Create a formula with a shared variable in your report -- for the sake of this example, we'll call it v_RecordCount.
  • The contents of the formula should look like this:
//Excute this formula as records are read into the report
WhileReadingRecords;
//define a variable that is available throughout the 'main' report
Global Numbervar RecordCount;
//increment the variable
RecordCount := RecordCount+1;

Step 2: Place the Variable in the Report header and Suppress it

  • Drag the formula into the "Report Header A" section.
  • Right-click on the formula you added in the report and select Format Field...
  • Click the Common tab.
  • Check the Suppress button.
  • Click OK.

Step 3: Craft the Proper Suppression Formula for the Sections
Note that the formula we have created will return null when there are no records. This is key to crafting the formula.

  • Right-click on the section you would like to show or hide based on having results.
  • Click Section Expert...
  • Next to the Supress (No Drill-Down) option, click the Formula button.
If you want to hide a section if there are no results, enter the following:
If IsNull({@RecordCount}) then true
else false
This tells Crystal to hide the section if the RecordCount is null (i.e. there are no results), and to show it otherwise.

If you want to show a section if there are no results, enter the following:

If IsNull({@RecordCount}) then false
else true
Or
If (Not(IsNull({@RecordCount}))) then true
else false

These both say "if the record count is not null" (i.e. there are records), suppress this field. Otherwise, show it (if there aren't any results).


Thursday, December 15, 2011

Crystal Reports 2008 Gotcha: Subreports with multiple parameter values [Field Notes]

The Setup

  • I have a report in Crystal Reports 2008.
  • The report uses a few different sub-reports.
  • The report links the subreports to the main report by passing the main report parameter to the subreport parameter.

The Problem

  • When calculating totals, it works correctly if I pass in a single parameter value to the main report.
  • However, if I pass in multiple values for a parameter to the main report (think multiple work order numbers for a WONUM parameter), the subreport calculates totals for all the fields 

The Solution
At first, it seemed like the issue was due to me not resetting the subreport total calculations on each page. But, I knew that I was doing this, and doing it correctly according to multiple reference points.

However, the issue (and thus, the solution) was simpler.

Because I was passing the main report parameter to the sub-report, Crystal was passing all parameters that I passed into the main report into the subreport, so the subreport was being told to calculate across all those values each time.

Instead, I changed the link to the subreport parameter. Instead of passing it the main report's parameter, I passed it the main report field that contained the work order number, thus assuring that it would only receive that one work order as a parameter.

See the StackOverflow discussion for more references and comments.