Blog Import

The new blog is now up (as you can see since you’re reading this). I imported the content from my old blog “Jess the Developer” and a couple of other blogs I no longer maintain. I’m quite happy to be using a fully “self”-hosted setup this time, so we can hopefully avoid a repeat of the previous blogging fiasco when blogger discontinued FTP publishing causing my website blog to get frozen/unable to be updated.

Because of technical issues (I’ll spare you the details), the automatic import feature (which looks really nice) didn’t work for me, and I ended up having to import most of the posts manually. It would have been too difficult and time-consuming to try to import every comment manually across blogging systems, so unfortunately that means you can’t go back and read the original comments on the imported posts. I guess we’ll just have to start making new comments!

Now I just need to work on coming up with a unique theme for the blog so it doesn’t look so generic. Any thoughts on what would make it reflect my personality and blogging goals?

Web Typography Cheatsheet

Because I don’t have all of these memorized yet, here is a quick cheat-sheet for making proper dashes and quotation-marks:

– en dash (–)
— em dash (—)
‘ left single quotation mark (‘)
’ right single quotation mark (’)
“ left double quotation mark (“)
” right double quotation mark (”)
‹ single left-pointing angle quotation mark (‹)
› single right-pointing angle quotation mark (›)

Yay! New Insight!

I don’t know why I didn’t think of this solution sooner! I was having this problem on a couple websites I maintain, that I needed to include some additional files, with extra content such as sidebars.
At first, I’d started out with a URL relative to the site root:
<?php include_once "/file.php"; ?>
But…that turns out to be insanely slow, as the php processor makes an HTTP request to download the page rather than loading it directly from the file system, because it treats it as a URL instead of a file system path address.
So then I’d switched the URLs to be relative to the page, so it would load it directly from the file-system. Not so bad in the basic case where everything’s in the same folder:
<?php include_once "./file.php"; ?>
But, when you start including one global file in everything, you can’t just copy and paste the URL from file to file. Somewhere deeper in the site, the include needs to change to include a stack of parent directories to locate the file.
<?php include_once "./../../file.php"; ?>
The other alternative would be to prefix the file with it’s actual location on the file-system, however, with crazy paths like /home4/mydomain/site1/ that I can’t be bothered to remember off the top of my head, let alone change every time I want to re-use the code on a different domain, that didn’t seem like a good solution.
But then, after fixing a few more broken links caused by the author of the new pages copying and pasting a template page from a different directory and forgetting to update those dot-dots, again, I decided to take another look into whether there’s an better way to refer to the file-system without making it super-slow.
And then an insight came to me, perhaps there’s a PHP variable that will give me the path to the site’s root dynamically without all that /home4/ garbage in the include directly. Aha! Yes, there is, $_SERVER["DOCUMENT_ROOT"] and Tada! problem solved!
So I changed all my includes to look more like:
<?php include_once $_SERVER["DOCUMENT_ROOT"]."/file.php"; ?>
and no more having to fix broken sidebars because the include URL went wrong again. And it can copy and paste between domains cleanly. I don’t know why I didn’t think of this solution sooner, but I’m glad I came up with it!

LoL, Ironic Isn’t It?

Excerpted From http://mike.elgan.com/post/6240583704/irony-alert-china-imports-chopsticks-from-the-usa:

Chinese takeout food with chopsticks

The best and most popular chopsticks in the world come from the American state of Georgia. One company called Georgia Chopsticks makes an incredible 2 million chopsticks a day, which are exported to China mostly, but with some ending up in Korea, Japan and the United States.

HIPAA Compliance for Online Forms

I started doing a little research about HIPAA compliance and what it takes to make office forms/database secure and compliant with HIPAA.

  • Need various consent statement wordings and access to your privacy practices handout, etc. — rather trivial
  • HTTPS/SSL urls when user is entering any of their information, redirect to secure URL if trying to access insecurely — I haven’t done this before, but it does not look like it would be terribly complicated or difficult to implement
  • database encryption – the user’s personal data needs to be encrypted while stored so that it can’t be accessed by unauthorized persons or hackers. — Smaller businesses have more leeway than a big corporation since there is less data/risk. MySQL does have some built in column level encryption methods, but those seem to be mostly aimed at preventing passwords from being stored in clear text rather than preventing a query from mistakenly bringing up the wrong user’s private records when they go to log in and preventing someone who works for the hosting company or whatever from tampering with user’s data. This is not my area of specialty, may want to consult with an expert. The solution itself is likely to be trivial or relatively easy to implement, knowing what to implement is the hard part.
  • Backups – there’s kind of debate it seems about whether hosting company backups are sufficient. The scale of the business may matter as far as the answer here, but should look into what the backup policies are for the web host.
  • Permanently expunging data that is no longer needed – Mostly, this is handled by not storing data you don’t need to store in the first place. You may want to think about whether this would entail a mechanism to be able to delete an entire person’s record, or whether deleting the database when it’s no longer needed is sufficient.
  • Hosting company should have an information security policy – basically,  the hosting company should have a policy about how information is backed up and who is allowed access to the data on your server. nothing exciting here (unless you were using some fly by night hosting company that isn’t professional).
  • “authentication and non-repudiation of users” – username and “secure” password (eg: 8+ characters) should be used to verify the user is who they say they are, and that they are authorized to access their own data.

Java Interview Topics

Here’s a list of common topics I’ve encountered on technical interviews pertaining to Java:

  • inheritance
  • polymorphism
  • multi-threading (locks)
  • interfaces
  • pass by reference/pass by value/pass by pointer
  • data structures/algorithms – eg: return top N duplicate results from large data set
  • set vs list
  • object vs non-object data types
  • internationalization – eg: utf-8 vs utf-16

It is a good idea to be prepared to discuss as many of these as you have experience with.

Comic Relief: Waldo, meet Carmen

Today’s strip is from “Mother Goose and Grimm”:

Carmen San Diego was one of my favorite computer games when I was a kid. My friend L. and I were running around for days announcing “We caught Carmen! We caught Carmen!” after we finally won the game together.

Computer Science 101

I was a bit amused because one of the things I noticed when I was tutoring intro to computer science was exactly that, thinking computer science was about designing and playing video games. Many of those were the same people who ended up hating programming and changing majors, it just wasn’t what they expected it to be, more work, less fun.