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!

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.

Oh No!


Looks like my laptop’s video card has gone from bad to worse 🙁

Free Online Book on Android HTML 5 Apps

I saw a link to this free online book about Android development on a blog I follow.

The book is called “Building Android Apps with HTML, CSS, and JavaScript” by Jonathan Stark.

Looks potentially useful! I think I shall bookmark this to look at later.

Anyone Looking For a Good Job Lead?

One of my team-members recently quit to move out of the country. So my boss is now looking for a replacement for him.
The position is primarily developing applications that run on mobile phones, particularly for Android and Blackberry and J2ME (java-based) platforms, though a background in any popular mobile platform is certainly a bonus (iPhone, WebOS, Brew, Windows Mobile, etc).
I wouldn’t say past experience with mobile software is a strict requirement. They did hire me, after all, and I hadn’t done mobile phone software before. If you are adept at picking up new programming languages and have a strong background in Java or C++, that might suffice. Other areas that are not strictly in any way necessary but might be a plus on your application: PHP, audio codecs (AAC, MP3), ANT, SVN, GUI design, databases, etc…
Current projects my team is working on are mostly Android and Blackberry applications,
especially Android at the moment. If this is the kind of job that interests you and you
don’t have that background already, go over to Google’s android developer site and start reading up on the platform and try out some of their developer tools; that’s just my personal two cents on how to break into mobile development if you don’t have experience there.

On Interviewing

Some comic relief about interviewing from “The Norm”:

StackOverflow

All week I’ve been trying to get myself some reputation on stackoverflow so I could mark helpful answers as I keep poking around for solutions to tricky programming problems I’m working on at work…but hadn’t been having much of any luck with trolling around the site to find open questions to answer that weren’t extremely difficult questions or outside areas of my expertise. But then today, when I was poking around on there, thought I’d try answering a couple, and actually stumbled upon a question that while I wasn’t sure I had the *right* solution I had a partial idea what was wrong and what I’d try to fix the problem, and left a comment suggesting my idea, and then a couple hours later, whoa, when did I got from reputation of 3 to reputation of 28? Go back and look, and apparently my hunch turned out to be right on and just what the guy needed to solve his problem so he’d approved the answer and voted up the answer giving me reputation points for each of those actions. So I was excited about that.

And this was kind of random funny coincidence too, but when I was poking around on the site–they have this feature called badges, and when I was poking around on the site, I happened to notice a username that sounded awfully familiar, and so I clicked on it, curious whether it could be my college classmate Mike or not, and sure enough, the personal info in the profile matched up. And for bonus funny random points, it looked like he’d created his account near the same time I did (like as in within the last week?) from his profile.

Bugzilla

Does anyone have anything to say about whether upgrading Bugzilla 2.x to the latest version is a major pain in the ass or totally worth it? We’re still using that “dinosaur” version at work, and I’m sure we’re missing out on all kinds of improvements and cool features and usability improvements, but the question remains, is it worth the headaches of upgrading?