pyesetz: (Default)
The next “Company 𝔾” conference is coming up very soon!  Three customer complaints came in over the last two days, saying that the website wouldn't let them have their sets of slides for sessions-not-attending, even though it had already given them the slides for the sessions they did plan to attend.

The problem is here:if ($x == "all") {
    …some code…
So, does some code get executed or not?
‣ Yes if $x is the string "all";
‣ No if $x is the empty string "";
‣ No if $x is Boolean FALSE (which prints as an empty string);
‣ No if $x is the number 1 or the string "1";
Yes if $x is Boolean TRUE (which prints as "1").

I can sort of see why the PHP folks might have thought that it should work that way, but that's not what I meant!  Fix:if ($x === "all") {
    …some code…
The third equals sign means exactly equal rather than close enough.

Of the 536 customers for this conference, only 52 have tried so far to get their non-attending slides.  Because of this bug, the software told all of them that their downloads were “unauthorized”.  Bad software, bad!  Fourteen customers got around the problem by using the download-in-parts function, which is just supposed to be for large books downloaded via slow, unreliable modems.  As for the other people?  It seems they meekly accepted the computer's claim that they were not entitled to their books (which were supposed to be included in their conference purchase price).  “Mr. Bear” sent them emails apologizing for the computer's impertinence and asking them to please try again to get their books for the conference.
pyesetz: (sozont)
I don't really have a website.  I used to have Furtopia, but I messed up and my account was frozen.  I used to be a paid member here at LiveJournal, but I had to cut costs.  For a while it seemed I didn't "really" need a website since I could just embed images directly in journal posts, but LiveJournal recently (and silently) stopped allowing that.  As usual, they didn't reply to my support request, so I'm left guessing as to why they did it.  My guess: it allows people to not buy LiveJournal memberships because they don't really need the ScrapBook® feature!  If that is really the reason, the new owners have flushed [ profile] brad's original raison d'être for this site and I should avoid paying them on principle.  That's too bad because I really liked the (poorly-documented) RSS feed of friends-only posts.  It was my favourite paid feature.

A few months ago I created a Google Sites website.  It seemed like it might fill the bill, although the documentation for how to write JavaScript for it seemed rather complicated, so I put off learning more about it.

Last night was the beginning of Rosh Hashanah.  Since "Mr. Bear" and I are both Jewish, I generally make a show of not doing any paid work on major Jewish holidays.  What to do instead?  I worked on my Google site.  Problem: it is difficult to figure out how images stored in Google's File Cabinet (example) are to be hot-linked from other websites (example — can you see the laptop photo?).  In general, it seems that Google Sites is too concerned with preventing you from doing things that will make Google look bad and not concerned enough with ease of (re)use.  Also, their Terms of Service allow them to delete your site at any time for any reason or no reason.  Hey, if I didn't care about long-term storage or customized programming, I would use Imgur!

So I restarted another old project: find an ISP.  I wanted
  • Server physically located in Waterloo, Ont. (since we have plenty of connectivity here);
  • Runs Linux so I don't have to learn another operating system;
  • Offers ssh shell access so I don't have to learn another "website control panel";
  • Virtual Private Server technology so I can get root access even with "el cheapo" shared hosting;
  • PHP and MySQL for custom programming (which is what initially attracted me to Furtopia);
  • About $7/month, which is what WestHost used to charge for this feature-set (but they're in Utah, the cheap plan is now $9 and doesn't include ssh anymore).
Last night I found lots of ISPs that had *some* of these features, but none had *all* of them.  And reading through HostSearch was depressing; so many of these hosts have gone out of business after posting their ads.  Consider AroundKW:  They're based in Waterloo, but apparently their server is in Florida.  No Linux, no ssh, and minimum $12/month.  Other people offer Linux for as little as $2/month, but almost nobody dares to offer ssh (which would be suicidal for a Windows-based ISP to offer, due to lack of security).

But lo and behold!  HostMDS offers Linux, ssh, PHP+MySQL, hosting in Waterdown Ontario (at least it's in-province, but they claim it's in Toronto?), and only $6/month!!!  Their Terms of Service are reasonably clear ("A website is considered using 'Excessive amounts of resources' when it monopolizes the resources available using 10% or more of system resources for longer than 60 seconds.") although it seems wrong to me to mention "Canada" and "DMCA" in the same paragraph.  Sorry, Stephen Harper, nobody but you wants a DMCA here in Canada!

So I tried signing up for their basic starter "Unlimited" plan.  Things were going fine until I got to the page where it said "To protect against fraud, we will now call the phone number you gave.  Enter this PIN when prompted.  Click HERE to begin the call."  But it was 1 AM and I had sleeping children!  Today I managed to get the signup process restarted to the point where their computer did call me and I entered the PIN and also the voiceprint of my name, but the transaction still didn't go through because it had already been "cancelled".  I tried a complete do-over, but then it wouldn't give me the hostname I wanted because "this name is already in use at HostMDS; cancel your other website first" but the name isn't in use and it shows in my account as "cancelled; status FRAUD".

I sent email to their sales department, but it's the weekend and they probably won't reply until Monday.  And then Rosh Hashanah will be over.

So I had to think of yet another thing to do that wasn't paid work and wasn't 8 boring hours of chanting Hebrew in a synogogue.  I started cleaning out my email inbox.  I actually managed to get rid of 10% of the oldest entries (down to 371 now) before thinking of something else to do instead: write this post!

UPDATE Sunday 20 Sept.: Heard back from HostMDS sales.  The "fraudulent" signup evaporates after 24 hours.  So I signed up again and asked for a new phone call—which failed because Wifey was on the phone to her mother!  Oh well, guess I'll try again tomrrow.

Work post

Feb. 27th, 2008 01:49 pm
pyesetz: (Default)

Lorem ipsum dolor sit amet.  This is some pointless text to go with the animated elephant, which was drawn by Vincent Pontier, who is apparently friends with Oliver Plathey who wrote the FPDF module for PHP.

When I started working at Company 𝔾 in June '06, I didn't know anything about MySQL, so "Mr. Bear" suggested that I use XML instead.  Being a n00b, I stupidly chose the DOMXML module, which is specific to PHP4 and has prevented us from migrating to PHP5.  Now PHP4 is at "end of life" and we really need to get rid of it.  Also the nightly validation report has started failing because even 48 MB of RAM is no longer enough to load in all the databases and check them for validity (because DOMXML has serious memory-leak issues).

This month I've been busting my tail, sniffing the grindstone, trying to get my billable hours up high enough to staunch the financial bleeding.  My RSS feed of LiveJournal posts now has 266 289 unread messages.  Last weekend I had gotten it down to below 100 but the posts just keep coming!  Oddly enough, there is no post from [ profile] xolo about his Christmas celebrations.  And no reply for my email to [ profile] loganberrybunny re the use of state/province to refer to the "home countries" of the UK; has offence been taken?

For the last three days I've been removing XML and replacing it with PHP arrays.  Instead of
<name>Joe Schmoe</name>
<city>Pike's Peak</city>
it's now
$DB_Entries['deadbeef'] = array (
'name' => 'Joe Schmoe',
'country' => 'USA',
'region' => 'Colorado',
'city' => 'Pike\'s Peak',

Looks about the same, loads 10‒20 times faster!  Really, this is a serious demerit for XML.  The whole point of XML was that, since everyone would use it, it was worthwhile to optimize the Hell out of the parser for it, so then XML should be parsed faster than any other format.  But PHP's program-code parser is much faster than their XML parser.  In part I think this is because of the attributes.  XML tags have optional attributes, even though I don't use them, so the isomorphism between XML and PHP-arrays potentially could fail, although it doesn't in my case.

Making this change required touching just about every actively-used file at the website!  All the databases needed conversion.  Any program that reads databases needed to start reading them the new way.  Any program that generates databases needed to start writing them the new way.  I've probably introduced dozens of bugs.  We'll see if I get any bug reports.  Most pages at the website are now served in only ⅓ the time they used to take; will anyone notice?

And so, with this little side-problem taken care of, I can get back to the main project for this winter.  Unlike most Company 𝔾 projects, this one actually has a deadline because there's a conference in May that it has to be ready for.  I need to convert various files to PDF and then combine the PDFs on the fly, hence the need for FPDF, whose homepage has an elePHPant and a link to Vincent Pontier, hence this post.  Bye!
pyesetz: (Default)
Well, that meme-filling form seems quite popular—It's getting about 400 hits per hour right now.  So I'd better do an encore before the applause dies down.

Continuing with the theme of reusing stuff I had to develop for my job, I now present the Three-column Meme Generator.  It's just like the last one, only this one lets you type in your own items for others to respond to!  Amaze your friends, confound your enemies!  More fun than reading Death Note, whatever that is.

Below is example output from the meme generator.  This thing took me a day and a half, so *please* spread it around!  In this one case, the comment at the form-filling page about "I didn't write the meme content" is inapplicable—I *did* write this meme.

× Live to eat Eat to live Chocolate
Chocolate milk × Squid eyeball sockets  (The most disgusting item ever prepared on Iron Chef) × Tea  (Not so bad, but don't drink it much)
× Coffee Coffee ice cream  (What can I say?  I'm from Boston!) Mint chocolate chip ice cream
Brussels sprouts × Okra Cabbage
Read more... )

pyesetz: (sozont)
I hereby tag [ profile] giza to fill out his answers for that gigantic meme I posted yesterday.  Here is an HTML form to help you out.

It took me five hours to code up that form, so I expect to see some meme-spreading going on!

And this is the source code, not that anyone will care.

*Edit*: Make the checkmarks appear for users of Internet Explorer 6 (why don't you guys join the 21st century and get firefox?).

*Edit 2*: Make the rejected statements display with black text like the accepted ones, even for users who have chosen a different foreground color using td,tr in their stylesheets (reported by [ profile] nicolasco).
pyesetz: (Default)
Unlike other blogging sites, LJ does not allow you to capture the "referer" (the page the user clicked on to get to your journal).  My journal is now getting about 8 hits a day, probably mostly from Google, but I have no idea what search-strings people are using because I can't see the referers.  Other bloggers, such as [ profile] bitchphd and [ profile] respect_otters, mention off-handedly that they read their logfiles and see interesting queries they can then comment on, but I can't do that because I'm on LJ.  Maybe I should move to a *proper* blogging site?

Behold!  I have written journal.php, which displays a reflection of my LJ but with referer-logging.  For example, here is the reflection for the post you're reading right now.  A hidden link from my Furtopia homepage to journal.php/calendar should cause my entire journal to be indexed under that URL.  Meanwhile I've set my LJ-info to "block spiders from indexing this journal" so all searchers must come in through the reflection.  Now I have to wait two weeks (for the changes to percolate through to Google's cache) and then everything should be just peachy!

Another advantage: Google recognizes LJ as a blogging site and displays only the journal name, not the matching text, for search-hits in journal pages.  Google does *not* recognize Furtopia as a blogging site, so matching text will be shown for hits on my journal.  Ta da!  The Internet shall obey my command.  I hope.
pyesetz: (Default)
I've gotten past [ profile] brad's lameness filter!  And this was only my second attempt!

Alexa says my website is one of the top 33 destinations on Furtopia!  And [ profile] loganberrybunny is only three times as popular as I am.  But Technorati claims that nobody who matters ever links to my journal— so why do they even mention me?

I've been working on taxes this week and haven't been doing daily upkeep on my logfile.  Ugh!  Now I have 275 new visitor-IP's to catalogue.  There are actually some interesting hits besides the usual pedo-search trash.  CYD is talking about me again.  Looks like they're happy with the comments my friends made about them in this post.  Hey, Donotsue, here's another mention of your name for the next time you go ego-surfing!

My monograph on search-engine users seems to be having quite an effect.  First off, it's a link-fest.  When people search for "pedophilia" they now tend to land on the "search-engine users" page instead of the more specific page for their search—and often as not they end up clicking on something off-topic like Who needs backups?.  But (perhaps coincidentally) Google seems to be ranking all of my pages higher now.  I'm getting quite a few hits from people searching for stuff like "ip city lookup free php code".  I can't explain why there's a sudden burst of interest in that field, other than that there's always been interest but suddenly my page is on the first screenful of search-hits.  My copy of John Downey's I18N_UnicodeString.php actually ranks only slightly lower (29 vs 24) than the author's official copy, for queries like "PHP Unicode storing".  I don't know why people would skip past his to click on my copy of the same thing.

I am just starting to get the barest inkling of the mind-boggling scale of Internet usage, which reminds me of AT&T's "Spaceship Earth" ride at Disney.  Hopefully I'll never get the kind of email that Wil Wheaton has to deal with.

This quiz says I act like I'm only 33 years old.  Ah, would that I were so young again!  And this quiz predicts that I will die at age 79.  I doubt it—neither my father nor my grandfathers lived that long, although some great-grandfathers did.

You Are Creepy
Serial killers would run away from you in a flash.

pyesetz: (mr_peabody)
Okay, time is up for my cookie contest.
Winners:[ profile] aethwolf, [ profile] maximous, [ profile] ethethlay, [ profile] dakhun, [ profile] foogle, and [ profile] stuffedwithfluf.
Extra-credit winners:[ profile] foogle, [ profile] aethwolf, and [ profile] ethethlay.
Double extra-credit winner:[ profile] ethethlay.

Since [ profile] stuffedwithfluf was the only female winner, I'll marry her and raise a family of geeklets.  Oh wait--we're already doing that.

The solution to the URL question is behind a cut to maintain the suspense )
     To succeed at the extra-credit problems, you *do* need to read the computer code, but you *don't* have to understand it--just look at the comments and the quoted bits of text, helpfully highlighted for your convenience.  The two  "Easter egg" files are hiding behind this cut )
     I thank the winners for playing this nerdy game with me.  To the (at least three) people who tried to win but failed, I thank them for their time and effort.  As for the rest of you, I thank those who didn't mutter curses at me under their breath.

Valid HTML 4.01!
pyesetz: (Default)
You won't believe what I had to do to get Wifey to agree to release this trip report.  (No, it wasn't in the bedroom!)  Anyway, without further ado, here is
Wifey's DisneyWorld 2004 Trip report
For comparison, here is my DisneyWorld 2004 photo-essay.  A careful reading detects some indications that we're both talking about the same trip.  For example, the number "2610" appears in both narratives.

Contest status:
  Okay, I'm trotting out this image one more time, just so one fur in particular can see his name in lights.  As interest in the contest seems to have petered out, I've shortened the deadline to 10-Dec-04.  Still five winners.  [ profile] aethwolf actually solved the extra-credit problem before my previous post, but I failed to see his email for some reason.  Two packages of cookies have been mailed so far.
pyesetz: (Default)
So far my contest has five winners: [ profile] aethwolf, [ profile] maximous, [ profile] ethethlay, [ profile] dakhun (my new LJ friend!) and mooglyguy (no LJ?).  I see that two readers in Ohio have made unsuccessful attempts.  So far, only MooglyGuy has figured out the extra-credit stuff but several others have had near misses, so I'll put off the first round of cookie mailings for another day or two in case another double-win happens.  There's still plenty of time to win!  Even if you've never won anything before, even if you barely know what "URL" means.
     Why am I running this contest?  Besides the obvious reasons ("because I can" and "to show off my database of furs' names and IP addresses"), I'm really hoping people will find one of the extra-credit thingies, so I guess I'll give out some hints:
  • I am a card-carrying member of the Free Software Foundation (member #1192).  We believe that "software should be free".  But not everything is free.  What would motivate me to cover up something in my files?
  • Where in the program are the furs' RL names being stored?
[ profile] maximous: I don't have a shipping address for you.  Will you be attending next week's bowling-meet?  Should I bring low-carb cookies?
pyesetz: (Default)
Everyfur sees a different image above.  If you don't like what you see, please send me a note with corrections.  [ profile] loganberrybunny: I am unable to pick you out of the crowd of anonymous fans I seem to have on BT-DSL, but if you call in from the Worcester library I should be able to put your name in lights from there.  [ profile] giza: either your ISP is screwy or there are furs all over the world who read your friends list.

Contest Announcement: Combine two pieces of data from this post to construct a URL that will provide you with more information on how I generate the on-the-fly image above.
Prize: A snail-mailed bag of cookies!  I intend to send a bag to everyone who causes an appropriate line to appear in my website logfile.
Group effort: The cookies go to the person assigned the IP address at the moment when a winning URL was issued.  Splitting the spoils with any helpers you might have had is *your* problem.
Extra credit: My program raw.php (now in color!) contains three "Easter eggs": files for which the content it shows is not the same as what's actually on Furtopia's hard drive.  One of the three is raw.php itself -- it hides its own Easter eggs!  (I amuse myself here by linking to the Greatest Hack Ever.)  For a double-shipment of cookies, send me an email naming one of the other files and saying how you know that raw.php is lying about that file's content.
Hint: No way!  I've already made this too easy.  RL cookies cost real money, you know!
Deadline: I *might* terminate the contest at the end of the year. All attempts must be made by December 10th.

Oh, and I've returned from my vacation at Disney World. Here are some cynical pictures.
pyesetz: (Default)
In the spirit of creative freedom, I now present to the world a useful computer program: raw.php.  It is like about 90% of all computer programs in that there would be no need for it if computers did not exist.  This program allows you to see the raw PHP code that is executed on the server when you access one of my files, such as sniff-sniff-sniff.php ("the Class 5 Anthro Dog").  Anyone with a modicum of code-reading ability should be able to see how little information I'm actually saving about my visitors.

[cue Dexter, Boy GeniusMy Greatest Invention Is Completed!  And now, using raw.php, everyone can see how it works: sozont/show.php shows one Sozont episode, sozont/all.php shows all episodes, sozont/index generates an episode index on-the-fly.  Isn't it gorgeous?  *ahem* I mean, if you like that sort of thing.  It doesn't have any fur or anthropomorphism, so I guess it's something of an acquired taste.

Snarky note: None of these files have copyright notices (or any comments at all, actually), so that means you have to assume I've reserved all rights, until you notice that the bottom of the main page on my website says everything is available under GPL.
Get Firefox!  )
pyesetz: (Default)
Two days ago I finally looked into PHP.  It's actually fairly easy to use (if you already know how to program) and it's included in the free hosting service from Furtopia.  I've upgraded my website to use PHP throughout.  Now you can no longer avoid my "camera trap" merely by disabling JavaScript or downloading pages for off-line reading.  Just access one page on my site and I'll know your dog's name and what you ate for breakfast (just kidding).  Let's see, what do the logs show?  Hey, I just got a visitor from Łódz, Poland!  Must be a geek: he/she looked at "When the Power of GNU Failed Me" and "Why I'm Going to Hell" but skipped over the other stuff.  I also changed my Sozont page (not that anyone cares) so that the one-episode-per-page and all-episodes-on-same-page views are generated from a common database.  Yay for PHP!

If any furry Jews are reading this and have a Hebrew-enabled browser, לשנה טובה תכתבו.  If your browser is very, very good, I can even say לְשָׁנָה טוֹבָה תִּכָּתֵבוּ.  All those niqudim on the letters add a nice Ðĕĉőŗąŧĩvę touch, don't you think?

If any orthodox Jews are reading this, I'd just like to say: Rambam was a false prophet!  Spinoza should be un-excommunicated!  Thank you, and have a pleasant new year.


pyesetz: (Default)

August 2017

13141516 171819


RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 22nd, 2017 04:55 pm
Powered by Dreamwidth Studios