blnfeed a natural blog

posted in internet, rants, aug 8, 2008ebay is not a game

to everyone looking at the auctions i’m looking at, i hereby remind you that ebay is not a game.  some of you seem to feel the need to “win” by beating my bid for whatever’s up for auction, even if you’re entering your SEVENTH bid on the same auction.

ebay certainly encourages this behavior, which makes sense because if ebay gets a percentage of the amount an auction closes at, they make the most money if the auction ends up as high as possible.

so if you’ve put in a bid on an auction, and somebody else puts in a higher bid, ebay e-mails you to try to get you to bid again:  “holy crap the world is going to end if you don’t come bid again right away!  joe_user_52 has outbid you on item #127612439 rooster toaster cover and there are only 3 days, 5 hours, and 57 minutes left!  joe_user_52 may have the auction now, but you can still bid higher to defeat joe_user_52 and WIN if you hurry!”  i made up the specifics of that one, but it’s essentially a paraphrased version of the outbid notice e-mail.

another factor that makes people bid again is the idea that “if joe_user_52 thinks the rooster toaster cover is worth $20 then maybe it might just be worth $25 to me,” despite that with ignoring joe_user_52’s bid it only seemed worth $10.  maybe it’s some sort of validation — “i was right to want this item.  joe_user_52’s bid proves it!  now it’s fine for me to want it more, so i’ll bid higher.”

and one other thing that probably contributes more than i’d like to admit is that people don’t understand the concept of entering your highest bid.  if you see something you want, and it’s worth as much as $10 to you, then you put in $10 as your maximum bid.  if only one other person wanted it, and they bid before you with $5 as their maximum, your bid will go just above $5 so you win by as little as possible.  bidding $10 on an item does not mean you will have to pay that much if you win — it just means you won’t have to pay more than that.

if all bidders were smart and knew what they were doing, no one person would bid more than once.  the bid you put in would be the most you’d be willing to pay for that item, so if somebody outbid you then you’re done — you’re not willing to pay as much as they are.  unfortunately for bidders who realize this (i.e. me), there are plenty of bidders who don’t.

ideally i should throw in my maximum bid as soon as i find something i like, then just leave it alone to see if i end up wanting it most.  in reality if i do that i’m going to end up paying more or even having the auction go higher than my maximum than if i were to hold out and bid just before auction close.  i often find if someone else has bid (and it wasn’t some really low bid right away), they will bid again as many as 5 times in a row after they see i’ve outbid them because they don’t want to lose.  if you ever bid a second time on an ebay auction (even moreso if it’s the sixth time), chances are you just lost right then.

0 comments on this entry

posted in xml, apr 28, 2008schema validation turns xml into ml

i’ve come to the conclusion that xml schema validation is bad.  this is the kind of bad in the way that javascript is bad:  it’s often misused and / or used for evil.  specifically, validating xml against a schema essentially removes the x in xml (which stands for extensible) because it doesn’t allow new tags to be added.  thus, by always validating xml against a schema, it becomes simply ml.

i propose that schema validation should not fail when additional tags or attributes are present in the xml but not defined in the schema.

a schema essentially defines what tags are allowed in an xml document, which tags can contain which other tags, and how many times tags can appear.  it does the same for attributes.

it may seem that an xml file that contains tags or attributes which are not in the schema should fail validation, when in fact it is normally better if it does not.  the simplest reason is that when accepting input, it’s best to handle the widest possible variety of formats.  an xml file is a form of input, and it’s certainly possible to accept xml that contains additional information beyond what’s expected to be there according to the schema.

i see schemas most useful when used as an interface in object-oriented programming:  an xml file must provide the information the schema says is required, but it is free to also provide additional information for other purposes.  of course whatever is going to read the file using the schema would ignore that additional information.  given the functions that exist to read xml files, it’s easy to simply skip over any information that isn’t expected to be there.

the reason this came up is that i was working on a c# .net project, and needed to add a setting to the application configuration file (which is an xml file with a schema).  this setting needs to be able to be present any number of times (including zero) and as it would probably be present somewhere in the 20-50 times range i didn’t think putting in <add key="setting" value="value1"/> that many times was best.  so i made up my own tags and tucked them out of the way near the bottom of the xml file.  it was still valid xml, but now .net throws an exception when i try to create an AppSettingsReader object to read the non-custom parts of the configuration file.  how annoying — now i have to change existing code to not use AppSettingsReader simply because i added other settings.  thankfully since AppSettingsReader requires a lot of repetitive work to handle potential errors i already had a function that everything was using instead of reading directly from the AppSettingsReader.  of course i had stopped using the whole application configuration thing on new projects a while before this, but this was a project started before that.

0 comments on this entry

posted in internet, html, unicode, php, apr 24, 2008html entities with utf-8

a while ago i started switching my php code from using htmlspecialchars() to htmlentities(), which as i understand converts a much larger group of characters into html entity form (for example, “—” becomes “&mdash;”).  i decided to go with that partially because there’s an html_entity_decode() and partially because i was thinking that it’s better to have “&mdash;” in my html than “—.”  i also started using smart quotes in my pages where i actually enter the html as &ldquo; &rdquo; &lsquo; and &rsquo;.

more recently i got to thinking about the fact that i serve my html with the utf-8 character set, and converting everything that’s not part of ascii (character codes 32 through 126) into html entities, which themselves are composed of ascii characters.  so why bother even specifying a character set if i’m not using it?  i’m also making my html harder for me to read because it looks like i&rsquo;m instead of i’m, for example.

looking at utf-8, the right single quote character (0x2019 in unicode) gets encoded using 3 bytes.  the html entity is all ascii which is one byte per character, for a total of 7 bytes.  so if i instead actually put the character into a utf-8 html document, i save 4 bytes on that one character in this example.  all html entities start with an ampersand and end with a semicolon, so with at least one character in between (though i don’t think there are any entities with only one-character names), that’s 3 bytes already.  the most bytes any single character can take up in utf-8 is 4 bytes, which is still less than any html entity i know of.

so with that, i’ll be switching back to htmlspecialchars() but decoding with html_entity_decode(), and using the actual characters in my files.  i don’t forsee any problems with this unless someone visits my site with a browser that can’t handle utf-8.

0 comments on this entry

posted in bathrooms, mar 8, 2008kindergartener height

whenever a public men’s room has the type of urinal where it’s not down into the floor, there’s always at least one at what i always think of as “kindergartener height.”

if you haven’t had much men’s room experience, what i mean by this is the urinal is installed lower on the wall such that if you’re taller than a kindergartener you should probably be a little careful not to accidentally pee on top of it instead of in it.  i’m not the kind of guy most people would consider tall and i do worry about exactly that whenever the kindergartener-height urinal is the only one available.  i can only imagine what it would be like for a basketball player, but then again i also worry that i’m going to hit my head on the supports on wooden roller coasters.

what i don’t appreciate is that even in places where it’s unreasonable to expect a kindergartener to be on a regular basis, there’s still that at least one kindergartener-height urinal that nobody wants to have to use.

0 comments on this entry

posted in words, feb 11, 2008we are all terrists

i suspect that anyone who knows who george w bush is also knows that he’s not especially skilled when it comes to pronouncing words.  one of his mispronunciations i find entertaining is “terrists” which appears to be short for “terrorists.”

pretend with me for a moment that “terrists” is an actual word.  the fist part, terr-, often means ground or the earth.  the second part, -ist, means a person.  putting those parts together then makes a “terrist” a person who lives on the ground / on the earth.  this is of course everybody.

so when bush says he wants to stop the terrists he’s actually saying he wants to stop all of us.  hopefully that’s not what he actually means...

0 comments on this entry

posted in travel, nov 15, 2007exit row

when i fly for work i like to sit on the exit row next to the window.  with the exit row, the window is also a door.  which is why it’s called the exit row:  the window is also a door.

airliners generally only allow passengers to enter and exit the plane through one door behind the cockpit, but the same exit signs label that door as well as all the other doors.  everybody knows that the other doors are only for emergencies, but they certainly don’t know it due to the signs.

there are additional exit signs on the exit row which tell you how to open the exit row doors.  it shows 4 steps and lists the weight of the door.  maybe it’s just me but when i see that in front of me and next to me, i start thinking “i could do that.”  and really i should be able to do that — if i didn’t think i could then i shouldn’t be sitting on the exit row.  the problem is that i have an urge to actually prove that i can do it.  i’m not sure if i want to prove it to myself or the other people on the plane, but i decided not to tell the guy sitting next to me that i was tempted (this was during takeoff).

i also wondered if since the seat by the window is lower to the ground (presumably this is so it’s less in the way when people are trying to get through the door) that it also has less cushioning than the other seats.  on my next flight the window seat was already taken so i had the aisle seat instead, and judging by the decreased soreness of my butt, the exit row window seats do have less padding.  i’m also not sure if the exit row window seat cushion actually works as a flotation device, but i couldn’t find a convenient way to test that one out.

another nice thing about the exit row is that not everyone on the plane is allowed to sit there.  this often means that while the other rows are full, the exit row might not be.  unfortunately, not even this can protect against having a large enough passenger sitting next to me that less than the full width of my seat is actually available to me.

0 comments on this entry

posted in internet, oct 2, 2007tags, you’re it

the concept of tags has been popping up more and more (i’m even using it here — the guides and photo album so far).  while i’m generally not into things that everyone is doing largely for the reason that a lot of people are idiots, but this one actually can be very useful.

there are really two parts to tags that are helpful — putting one thing into multiple groups without copying it, and making new groups on the fly.  i say groups here instead of tags because whatever i was using before probably had some sort of grouping, but didn’t allow for these two things.  really i probably could have made the new groups on the fly thing happen (here i’m using an enum column in a mysql table to say what group (category) each post is in, and i add a value to the column definition if i need a new category), and that one’s not as useful as the multiple groups.

so the real benefit is being able to put one post in multiple categories without making a copy.  i can’t do that currently with the way bln is set up, but as you can see from my to-do list, i have plans to use tags in more areas of the site.

since tags allow one item to have multiple tags, i can make it even easier to find the right items.  after filtering to items that have tag 1, i could look at the other tags that items with tag 1 have, and allow filtering for example to items with tag 1 and tag 2, or tag1 and not tag2.  i could even filter by more than two tags, but so far i haven’t taken it that far.  again i have plans to though.  who knows if i’ll get to the multi-tag filtering or the switching more parts of the site to using tags next though . . .

5 comments on this entry

posted in relationships, sep 11, 2007focus on making someone other than you happy

i'm not sure where or when anymore, but i once heard that hell is a dinner table where all the silverware is way too long, so nobody is actually able to eat anything because they can't get their hands far enough away from their mouths.  heaven then is actually the same setup, but instead of trying to feed themselves everyone reaches across the table to feed the person sitting across from them.

it's nice when somebody does something for you, whether it's something you would have otherwise done yourself or something that would otherwise not have been done at all.  if more people actually put their energy into doing things to make other people happy, it would result in everybody being happier than they would have been had they instead tried to do things to make themselves happy.

the most important thing anyone can do in a relationship is to spend time doing things that only benefit the other person.  while it's still important to appreciate when somebody mows the lawn, makes dinner, shovels the driveway, or washes the dishes, it says a lot more to do something like massage the other person's back or bring them dinner when they had to work late.  the difference is that the first group also benefits both people in the relationship, where the second group doesn't benefit the person doing it beyond feeling good about doing something nice for the other person.  in other words, both people directly benefit from having the driveway shoveled so they can leave to go to work, but only the person receiving the massage significantly benefits from it.  it might seem like things that benefit both people would count half as much as things that only benefit one person as far as how they contribute to that person feeling satisfied in the relationship, but for me it's felt like a lot less than half.  i don't often see things the way that other people do though, so that last bit might not be useful to anyone not married to me.  all the same, i'm fairly certain that almost anybody would recognize and appreciate someone else spending time to make something better for them and only them.

really even roommates will find a balance for who does which parts of everything that needs to be done for the benefit of everyone living together (if they can't find a good balance they aren't likely to stay roommates long), but i think couples need to do a lot more.  couples need to make efforts to make each others' individual lives more enjoyable if they really want to be more than roommates (this is ignoring the fact that couples are generally more physical than roommates, but those activities normally benefit both people anyway).  also the more effort you put into making things better for the person you love, the easier it will be for them to do the same for you, which in turn makes it easier for you to do nice things for them, and so on!  so doing nice things for another person that don't directly benefit you actually does end up indirectly benefiting you after all.

if this is something you haven't been doing much of, it may take a while for the other person to get used to it, but if you keep at it not only will you have the reward of having made someone you care about happier, but they will also be more able to do something nice for you.  so start doing more for the person you care about, it will make things better for both of you!

0 comments on this entry

posted in internet, jun 5, 2007greasemonkey

a lot of internal websites at work don't have a favicon, and i think every site really should have one.  i'd heard of greasemonkey for firefox and figured i could use it to insert favicons on sites that didn't have any.

sure enough, it works!  i have a copy of the script with a different favicon url for each site, but here's the basic idea:

// ==UserScript==
// @name           someintranetsite favicon
// @description    Displays a favicon for someintranetsite pages
// @include        http://someintranetsite/*
// ==/UserScript==

var head, favicon;
head = document.getElementsByTagName("title")[0];
if(head) {
  favicon = document.createElement("link");
  favicon.setAttribute("rel", "shortcut icon");
  favicon.setAttribute("href", "/images/icons/someicon.gif");
  head.parentNode.insertBefore(favicon, head);
}

the script won't do anything if there's no <title> in the page code (though it may work if it's <TITLE> instead).  just set the @include in the header to the server name instead of someintranetsite, and change the value of the href attribute on favicon to the path to the image you want to use.  note it doesn't have to be an ico file, nor does it have to be 16x16 pixels.  whatever image you put there firefox will resize to 16x16 and display in the tab and address bar for that site.  it even shows up in the bookmarks!

the only complaint i have about greasemonkey is that it puts a monkey icon in the status bar, which allows you to quickly disable the extension.  that's not a problem by itself, but there's no setting to get rid if it! i try to keep my browser relatively free of clutter and i don't see myself actually wanting to use it from the status bar.  there's probably something i could put in the userchrome.js file to get rid of it, but i don't know what that would be.  if anybody knows, post a comment here and tell me -- i may end up asking whoever wrote greasemonkey if there's a way to get it out of the status bar.

0 comments on this entry

posted in internet, mar 16, 2007file uri syntax

it's always bothered me when people get file uris wrong.  for example, if you want to refer to a the file c:\boot.ini on a windows systems, the correct uri is file:///c:/boot.ini -- not file://c:\boot.ini or file://c:/boot.ini, or really anything other than file:///c:/boot.ini.  so i thought that for a file uri you had to start with file:/// -- with the three slashes.  i thought it was kind of stupid and confusing for file to have three slashes while http, ftp, and practically everything BUT file use two, but nobody seemed to be able to get it right anyway.

i often see internal web pages at work that link to files on the network using the syntax file://example.com/directory/subdir/filename.ext (that's meant to be generic, where example.com is used in place of my company's actual domain since i don't want to tell the internet where i work, and /directory/subdir/filename.ext is just a generic path i made up).  file links get ignored in firefox by default (presumably to prevent naughty sites from being able to look at your files without you knowing), but even with that changed, those file://example.com/ links don't work!  they don't work in opera either.  to make matters worse, i tried to correct these links to file://///example.com/ on a microsoft sharepoint page for my team, and it converted it back to two slashes automatically!  so i was stuck with links that refused to work in anything other than ie for no reason.  (thankfully we've since upgraded to a newer version of sharepoint that doesn't do this.)  i thought that syntax was just plain wrong, so i went looking for the specs so i could prove it.

well, here is the file section of the uri spec, and i can see where file://example.com/ could actually be valid, and also now see why there are three slashes.  (in case you don't, it's because there's no server name -- http always has a server name so it's http://www.track7.org/ where www.track7.org is the servername.  take out the server name and you'd have http:/// just like file:///.)  so really i could consider it a bug that firefox and opera (and presumably others) don't support file://example.com/ syntax, but everything (even internet explorer) supports file://///example.com/, so it would be better if people could just use that.

i haven't explained why file://///example.com/directory/subdir/filename.ext is correct yet though, so here's that part.  the uri spec i referenced earlier says that the syntax is file://<host>/<path>, and often you'd leave the <host> part off since that means it's a file accessible by the system viewing the page.  since \\example.com\directory\subdir\filename.ext is accessible from the system viewing the page, it's completely correct to convert those backslashes to forward slashes and add the file:/// prefix, for a total of 5 slashes immediately following file:.  since this syntax works in all windows browsers (by all, i mean internet explorer, firefox, and opera), it's definitely better than the file://example.com/ syntax, which only works in internet explorer.

the spec doesn't really say how the path should be given though, so file:///\\example.com\directory\subdir\filename.ext could also be valid, but less useful than using forward slashes as backslashes often have special meaning.

0 comments on this entry

welcome to track7!

color | register

users online

31 guests

user list

feedback

statistics

hits today20
registered users383
forum posts385
comments128

powered by