dannyman.toldme.com

This page features every post I write, and is dedicated to Andrew Ho.

November 28, 2012
About Me, News and Reaction, Relationship Advice

It Wasn’t Me

Link: https://dannyman.toldme.com/2012/11/28/it-wasnt-me/

Mercury News reports Fremont man charged in tree hanging attempt:

FREMONT, Calif.—A Fremont man is facing charges that he tried to hang his girlfriend from a backyard tree.

Thirty-one-year-old Daniel Howard is scheduled to be arraigned on attempted murder and criminal threat charges on Tuesday.

Police say they found Howard Sunday evening standing behind his girlfriend, who was tied to a tree with a rope fashioned as a noose around her neck. Her hands were tied behind her back.

Howard was allegedly continuing to wrap the rope around her neck.

. . . I’m 36 years old and I live in Sunnyvale.

Feedback Welcome

November 23, 2012
Presidential Decrees

Presidential Decree #1: Black Friday

Link: https://dannyman.toldme.com/2012/11/23/presidential-decree-1-black-friday/

On the Friday immediately following Thanksgiving, no store may open any earlier than it does on any other Friday.

On Thanksgiving, a store may extend their hours beyond the time they usually close, but all customers must be offered a complimentary slice of pie, of a size not less than 1/8 of a 9″ diameter pie, and no less than 1″ deep. A store must offer either pumpkin, sweet potato, or pecan pie, but may offer additional flavors. Customers will be allowed their fill of complimentary coffee, tea, drinking water, and whipped cream.

Feedback Welcome

November 12, 2012
Technical, Technology

Amazon Hack: Reverse Showrooming

Link: https://dannyman.toldme.com/2012/11/12/amazon-hack-reverse-showrooming/

Modern retailers have a challenge we have come to call “showrooming” where a consumer visits the local store to try out a product, then they go and order the product off Amazon.com or another retailer for less money. Some retailers will do online price matching, which is reasonable because even though that lowers their margin, they still get the sale, and can upsell you a few accessories. I saved a few dollars this way while buying a TV from Fry’s.

However, I was just browsing Amazon.com for a resin adirondack chair, where I saw:

Twenty six bucks!? Sounds good . . . not eligible for Prime, so let’s check the shipping . . .

Whiskey . . . Tango . . . Foxtrot . . . $192 shipping you say?!! Something is fishy here . . .

So, I surf on over to True Value’s web site, where the chairs are $20, and they’ll ship to the local store.

Which makes me wonder if this is a case of “reverse showrooming” . . . I go to Amazon.com because I can probably find what I am looking for, then I am led to a local retailer to save money. Very clever . . .

Feedback Welcome

November 7, 2012
JIRA, Technical

JIRA Workflow Transition Condition: check_parent_resolved.py

Link: https://dannyman.toldme.com/2012/11/07/jython-workflow-transition-check-parent/

It took a few hours to figure this hook out, so I’m including my hard-won lines of code here.

# -*- coding: UTF-8 -*-
# Check if PARENT is resolved.
# Monitoring creates Events in the Event queue, these Events
# automatically create Incident children.
# We don't want to resolve any Incident children until the parent Event
# resolves.
# 
# (Normally you want to block on your children instead of your parent.)
 
from com.atlassian.jira import ComponentManager
from com.atlassian.jira.issue.link import IssueLinkManager
 
ilm = ComponentManager.getInstance().getIssueLinkManager()
 
# Assume we are okay ...
result = True
 
for link in ilm.getInwardLinks(issue.getId()):
    if link.getIssueLinkType().getName() == "Parent" and link.getSourceObject().getResolution() == None:
        result = False

Feedback Welcome

October 30, 2012
Letters to The Man, Technology, Testimonials

Advice to Hotels

Link: https://dannyman.toldme.com/2012/10/30/free-internet-duh/

From a survey I just filled out regarding a business trip to London:

Internet access … kept dropping packets, and I had to keep logging in to it via iPass. Don’t gouge customers, just let them on. This is seriously trivial, low-hanging fruit, which can make all the difference in the world esp for an international business traveler avoiding mobile roaming charges.

I would without hesitation stay at a more mediocre hotel that could deliver hassle-free, reliable Internet service, and the hassle-free starts with avoiding the damn tariff screen and just letting your guests on … guests who will appreciate this no-nonsense convenience far more than whether the staff have been properly trained to smile, &c.

I gotta say … we seem to “get this” in America … I’ve stayed at plenty of budget motels which offered complimentary, hassle-free, reliable Internet access. Though, I don’t recall having the same pleasure at a hotel in New York, where you could get free Internet in the lobby, but had to pay for it upstairs in your room.

For many of us, network access is kind of like tap water: we take it for granted that it should just flow, and not require one to jump through hoops to pay an additional $20/day. If there’s a business hotel chain that has figured this out, let me know, because my loyalty would be easily won.

Feedback Welcome

October 25, 2012
Religion, Testimonials

Hajj

Link: https://dannyman.toldme.com/2012/10/25/hajj/

“According to Islamic tradition the Kaaba was re-constructed by Abraham. It is stated in the Qur’an that this was the first house that was built for humanity to worship Allah.”

Malcolm X, an American human rights activist, describes the sociological atmosphere he experienced at Hajj as follows:

There were tens of thousands of pilgrims, from all over the world. They were of all colors, from blue-eyed blondes to black-skinned Africans. But we were all participating in the same ritual, displaying a spirit of unity and brotherhood that my experiences in America had led me to believe never could exist between the white and the non-white. America needs to understand Islam, because this is the one religion that erases from its society the race problem.

A 2008 study on the longer-term effect of participating in the Islamic pilgrimage found that Muslims’ communities become more open after the Hajj experience. Entitled “Estimating the Impact of the Hajj: Religion and Tolerance in Islam’s Global Gathering”, a study conducted in conjunction with Harvard University’s John F. Kennedy School of Government found that the Hajj experience promotes peaceful coexistence, equality, and harmony. Specifically, the report states that the Hajj “increases belief in equality and harmony among ethnic groups and Islamic community and that “Hajjis (those who have performed the Hajj) show increased belief in peace, and in equality and harmony among adherents of different religions”

Sourced from Wikipedia: Kaaba, Hajj

I kinda like just listening to the guy praying along in Arabic. Very relaxing. Even when I was a kid, I thought it was a cool idea that when Muslims pray, wherever they are, they face the same spot. Reading observations that having what amounts to a yearly conference that brings people from across the world together in fellowship . . . that is also a good thing.

Organized religion, and especially Islam, are not without some serious problems, so it is reassuring to see some of the spiritual unity and good spirit that result from a practice that so many people today and throughout history have dedicated their lives to.

Feedback Welcome

October 22, 2012
Technical

HOWTO: Style a Multi-Column List in HTML

Link: https://dannyman.toldme.com/2012/10/22/html-css-ul-li-columns/

For a project at work I was asked if I could lay out a long table-of-contents in our CMS as multiple columns. Logically enough, the table-of-contents renders as a flat, unordered list (UL) of list items (LI) … arranging that as multiple columns is a preposterous idea! Of course, preposterous questions can be very interesting.

So, we start with something like this:

		<h1>Yadda Yadda</h1>
 
		<ul class="columns">
			<li>BLAH blah blah one</li>
			<li>BLAH blah blah two</li>
			<li>BLAH blah blah three</li>
			<li>BLAH blah blah four</li>
			<li>BLAH blah blah five</li>
			<li>BLAH blah blah six</li>
			<li>BLAH blah blah seven</li>
			<li>BLAH blah blah eight really long example</li>
			<li>BLAH blah blah nine</li>
			<li>BLAH blah blah ten</li>
			<li>BLAH blah blah eleven</li>
			<li>BLAH blah blah twelve</li>
		</ul>
 
		<h1>Yappa Yappa</h1>

Which renders as:

Yadda Yadda

Yappa Yappa

Okay. So, multiple columns? That is what TABLE is for, but we are dealing with UL. But I have my old friend the float attribute, so I define a style sheet:

			ul.columns li {
				list-style: none;
				float: left;
				width: 30%;
			}
			h1 { clear: left; }

Now we render as three columns:

Yadda Yadda

Yappa Yappa

Two columns? Four? Just tune the width attribute:

			ul.columns li {
				list-style: none;
				float: left;
				width: 45%;
			}
			h1 { clear: left; }

And you get:


It is not perfect. The content renders left-to-right, so strictly speaking, these aren’t columns.

If you narrow enough to cause wrapping you get some odd gaps.

Due to margins and the like, you can’t just say three columns is 33%, two columns is 50% . . . if you narrow this page enough you’ll see a graceful degradation from more columns to fewer.

Here’s a more dynamic example, where wider pages will get more columns:

			ul.columns li {
				list-style: none;
				float: left;
				width: 15em;
			}
			h1 { clear: left; }

Renders as:


The block following your UL will need to clear the floated content, hence the clear: left on the H1, above.

See also:

Feedback Welcome

September 25, 2012
JIRA, Python, Technical

Jython Validator Cookbook

Link: https://dannyman.toldme.com/2012/09/25/jython-validator-cookbook/

Building on a previous post to validate user time tracking, a few “cookbook” scripts that may be handy to you or me in the future.

JIRA 4.2, YMMV.

Validate User Time Tracking

Somewhat elaborate: enforce that time worked has been logged, except under certain circumstances. See original post.

import com.atlassian.jira.issue.worklog.Worklog
from com.atlassian.jira import ComponentManager
 
# Time Already Logged
timespent = issue.getTimeSpent()
# Time Logged via current screen
try:
    timelogged = dict(issue.getModifiedFields())['worklog']
except:
    timelogged = False
 
# Duplicate Issue?  It is as good as logged!
resolution = issue.getResolution()
if resolution['name'] == "Duplicate":
    timelogged = True
if resolution['name'] == "Self Corrected":
    timelogged = True
 
# Nagios likes to close tickets, but doesn't get paid
user = ComponentManager.getInstance().getJiraAuthenticationContext().getUser()
if user.getName() == "nagios":
    timelogged = True
 
if timespent < = 0 and timelogged == False:
    result = False
    description = "Please log the time you spent on this ticket."

Assign Unassigned Issue to User

This helps make sure tickets get assigned.

# -*- coding: UTF-8 -*-
from com.atlassian.jira import ComponentManager
 
assignee = issue.getAssignee()
user = ComponentManager.getInstance().getJiraAuthenticationContext().getUser()
 
if not issue.getAssignee():
    issue.setAssignee(ComponentManager.getInstance().getJiraAuthenticationContext().getUser())

Validate Custom Field Value

We have a particular custom field which can be set UNKNOWN by the Reporter, but which should be cleaned up by the Assignee.

from com.atlassian.jira import ComponentManager
 
cfm = ComponentManager.getInstance().getCustomFieldManager()
product = issue.getCustomFieldValue(cfm.getCustomFieldObject('customfield_12345'))
 
if product == 'UNKNOWN':
    result = False
    description = "Please set CUSTOM_FIELD value appropriately."

Feedback Welcome

September 13, 2012
Linux, Sundry, Technical, Technology, Testimonials

Smoothing Out Fonts on kubuntu-desktop

Link: https://dannyman.toldme.com/2012/09/13/make-kubuntu-kde-fonts-pretty/

So, I really like Ubuntu. Its Linux and it just mostly works. Except when they try to force everyone into some experimental new desktop environment. That is pretty awful, but I’m happy again now that I switched to kubuntu-desktop. (apt-get install kubuntu-desktop)

Kubuntu is Ubuntu with a nicely set-up KDE environment. They try to get you to use their own home-grown web browser, and the file manager takes some getting used to, but you can pretty quickly get under the hood, set up all your little window manager preferences, and get back to jamming. (Focus Follows Mouse in my house!)

The only thing that was missing is the fonts were rendering . . . not as pretty as regular Ubuntu. Kubuntu is set up to use the Ubuntu font, but in KDE things render kind of pixelly looking, like I was still in the 90s. A bit of searching and they seem to look nicer:

System Settings > Application Appearance > Fonts
Use anti-aliasing: Enabled
Configure…
Use sub-pixel rendering: RGB
Hinting style: Slight

Now things feel a little more 21st century.

Feedback Welcome

September 12, 2012
About Me, Letters to The Man, Testimonials

Former Eagle Scout

Link: https://dannyman.toldme.com/2012/09/12/former-eagle-scout/

Via Facebook: “Guys, I finally wrote a letter to the Boy Scouts to resign my Eagle Scout rank, and sent it along with my badge. It was hard to do but I can’t continue to the associated with an organization that has become so discriminatory and bigoted toward gay youth & leadership.”

As a former Boy Scout who never made Eagle, I am impressed by those that had the dedication to put in the hard work to attain that rank. I am not surprised to hear that my college friend, Dan Wright, made Eagle, and I am proud that he did.

Two decades on, it takes some integrity to renounce the hard work and proud accomplishment of youth, in the name of those youthful values. Trustworthy, Loyal, Helpful, Courteous, Kind, and Obedient to a code of Universal morality which affords equal respect to all people.

Dan did well in his younger days, and he’s doing right now. Sometimes the label which you have earned just doesn’t fit on the heart within.

See Also: Eagle Scouts Returning Our Badges

Feedback Welcome

September 1, 2012
About Me, Testimonials

How to Ride a Bicycle . . .

Link: https://dannyman.toldme.com/2012/09/01/how-to-ride-a-bicycle/

. . . and how to make the streets safe!

First off, a couple years back, someone very close to me wanted to learn to ride a bicycle. I took her to a free workshop in Brooklyn where two dozen people learned how to ride a bicycle in a few hours. The process was surprisingly simple: you take the pedals off and learn to scoot around, then how to turn and brake. Once you are comfortable balancing on the bike, the pedals go back on and you learn the tricky part: how to shift your weight and pedal, with full confidence that you can manage everything else once you get the thing going. What took me weeks to learn as a kid is something adults can now pick up in a few hours.

A few times now I have recounted this inspiring story, and I have found that REI covers the technique in good detail. So, if you know someone who wants to master the two-wheeler, now you know a good way to do it!

On a not-unrelated note, I just enjoyed this article about European street design, where instead of designing every street for cars but also allowing pedestrians on the side, they design some residential streets for pedestrians, but also allow cars to crawl through slowly. Instead of designing for “speed” they design to make driving “tortuous” . . . cars are damned convenient and you’ll drive when it makes sense, but when you’re in a neighborhood it is good if you slow the heck down and pay attention to your environment. So, the Dutch will do things that sound absurd in America, like putting playground equipment in the roadway.

The thing is, if you are slowly driving through an obstacle course, you’re going to be a lot more careful, and if you do end up hitting something, you’re going to do less damage at 10 MPH than you would at 30 MPH. As someone whose commute is now primarily via bicycle, that kind of thinking makes me very happy.

Ah yes, speaking of my bicycle commute, the Deputy Director of the Silicon Valley Bicycle Coalition suggested I attend the next meeting of the Bicycle Advisory Committee Meeting of the City of Santa Clara, after I shared with him this email I recently drafted to the Mayor of Santa Clara:

Subject: Tasman Drive Hostile to Bicyclists

To whom it may concern:

I am an employee of Cisco Systems on Tasman Dr in San Jose. I commute to work via Scott Boulevard, the San Tomas Aquino Creek Trail, and finally via Tasman Drive into San Jose. The commute is mostly very pleasant, except for the section of Tasman Dr in Santa Clara.

For my own safety, I take the full right-most lane when bicycling on this road. I do this because there is no bicycle lane and because it is very scary to be passed by vehicles speeding above 40 MPH, and because the sight visibility is limited on the overpasses. I want to ensure that vehicles can see me and pass safely.

In each of the past two days I have been harassed by drivers on this roadway. Yesterday afternoon a woman was honking at me, and this morning a man pulled up next to me and yelled obscenities at me from his SUV. Tasman Dr is scary enough without the obscenities, and it makes Santa Clara feel like a more hostile and threatening place.

Please consider the following suggestions:
– Install a bicycle lane on Tasman Dr, at least between the San Tomas Aquino Creek trail and the bicycle lane in San Jose.
– Consider lowering the speed limit, to make the roadway feel more hospitable to mixed use.
– Short of these suggestions, post signs advising that bicycles may make full use of the lane.

The section of Tasman Dr near Great America Parkway has been very pleasant due to the speed restrictions and signage that accompanies stadium construction. In constructing the stadium you have inadvertently demonstrated what a pleasant and progressive bicycling experience Tasman Drive can be.

Thank you for your time and consideration.

Sincerely,
-danny

For now, I have cooked up a less-threatening alternate route. I am skeptical that I can get Tasman Dr changed around, but the Bicycle Coalition guy was very encouraging and I look forward to providing some advice in civil planning! If in the next few years Tasman Dr becomes a nice way to bike I will be very happy about that.

Feedback Welcome

August 25, 2012
About Me, Movies, News and Reaction, Politics, Testimonials

Mitt Romney Plays the Race Card

Link: https://dannyman.toldme.com/2012/08/25/mitt-romneys-coded-racism/

As a white guy I can often get away without worrying about racism. But then I’ll get on the phone with my step mother. As a proud black woman, she takes the Obama hatred personally. “They wouldn’t be so vicious except he’s black.”

I know enough about my country to agree. This is a racist country. We have elected a black man, but we’re in that awkward transitional phase where we feel like we’re over the worst of it but we still have racism that gets diluted year after year. Not sure if that is true or not . . . but like I said, the white majority manages not to think too often about racism.

I get reminded again, today, catching up on blogs and Angela Tung has to speak up about this video:

http://youtu.be/4qDE3RBUfzM

She contrasts this to McCain in 2008 gently prying himself away from more blatant racism from some of his supporters:

The earlier video makes me squirm all the more … I wish McCain had said that Arabs are decent people too … but you can tell that his top priority is to back away from the crazy. McCain isn’t going to revel in the easy hatred of his opponent. “Obama is a decent man. You do not have to live in fear of Obama being president!”

And, I’m totally cool with a sense of humor, but us white guys, especially anyone running for public office, know there are things you just don’t joke about, especially not in front of the TV cameras. Of course nobody asks about our birth certificate. Nobody asks where we are from. That never happens. Its preposterous! Because white == American == white! Everyone knows this! The only reason an intelligent person like Mitt would crack a joke about his birth certificate to a crowd of supporters is as a nod to his “birther” supporters.

And you know why there’s a birther movement who absolutely can not believe that the president of the United States, Barack Hussein Obama, is a native-born citizen of the United States? I’ll give you a hint. Some coded, off-color humor:

Nobody asks for Romney’s birth certificate because he’s not a n*gger.

That’s the plain and simple truth, and when Romney deliberately brings it up he is race-baiting his audience.

Angela takes is more personally than I do … she is quicker to speak up. But even if the casual coded racism doesn’t bother you, what is all the more disappointing about Mitt Romney is that he is so desperate to pander to an audience that he will even pander to racism. John McCain had some character and integrity. The same has not been demonstrated by Mitt Romney.

Feedback Welcome

« Newer Stuff . . . Older Stuff »
Site Archive