Jason Vertucio

You know me! ™

I build a little demo of the Instagram API

I’m learning how to use the Instagram API. Originally I signed up to use it so I can see if I could just mass-delete all my photos. By the way, I can’t. And now it doesn’t matter so much.

Oh, in case you missed it, they changed their ToS back to the version where they won’t have the right to use your photos with no compensation back to you. So, since they fixed that, I’m staying.

I put together a quick demo of the API. The only demo I have is one that goes through all of your followers and everyone you follow, and puts everyone onto a single screen where you can see if a user follows you or not, and likewise for your relationship with them.

If you want to see it, you can find the demo at jasonvertucio.com/demo/instagram_api. And if you try it out, let me know what you think in the comments below. If you find a problem, post it so I know what I need to work on to get it running.

What’s the best environment for developing websites?

I used to use Dreamweaver. Made it up to CS5.5 thanks to various jobs and stuff. At my current job they have Dreamweaver CS5.5, but lately I’ve been using my Mac for other projects, like at home and stuff.  I use Coda, because it has built-in FTP and it’s easy to use. I wish I could install it on my computer at work, but they seem to not allow installing software.

And, well, that’s for the best.

Anyway, inspired by this post on LinkedIn, I decided to ask you, the readers to this little blog, what your opinion is on the matter. I actually set up a poll on the right to answer. So, I’ll just sit back and await the responses.

If you answer OTHER, please add a comment below or write me on Twitter (@jayv and follow me coz I recently went private). I’ll add the option and let you know so you can change your vote. The plug-in I use (UPM)  doesn’t allow one to add poll answers.

SendMail Class (PHP Programming)

In case you’re one of those people who doesn’t care about . . . you know . . . web programming . . . . here’s a fun picture of how we all feel about the new Total Recall film.

For all the rest of you . . . I created a little PHP class that I’d been using for about three years, and updating on and off during that period. It’s simply called SendMail (although for some reason I called the class tofSendMail, which I’ll fix in the next release), and it was developed to easily handle the creation and sending of emails.

For the first public release, I have given you simple features such as the obvious:

  • To, From, Subject
  • CC, BCC
  • HTML and Text versions
  • Sending via PHP’s built-in mail function
And of course:
  • Attaching a file
  • Loading and parsing a text file to send

It’s nothing spectacular, but I decided to release it under the GPL license. I wanted to make it public because I don’t know what else to do with it. I figure you guys can point me in the right direction. It’s currently functional, so you could use it in a live site today. Actually, I may plan to use it on a project I have coming to me this weekend.

If you end up using the PHP class, please let me know. If you want to fork and contribute, definitely let me know. And if you find any bugs or want to see any other features in it, it is compulsory that I know. Also, this is the first time I’m ever using GitHub. If this repo is a rousing success I’ll drop in some other bits of PHP that I had written in the past for everyone to enjoy.

Enjoy!

Sometimes I wonder how good of a web developer I really am

Here’s the thing: I get things done. You say you need this or that, and nine times out of ten it’s done. Four times out of five it’s in a timely manner.  But when I go back and look at the code that I wrote, I can’t help but scratch my head and wonder what possessed me to write everything so haphazardly. I’m finally getting deeply into Linux, so far as I can set up a website without the use of a control panel like cPanel or Plesk. But I’m sure once more advanced things happen, the scripts and config files will end up looking just as jumbled as everything else I write.

So, at the place where I sit in an office and work, I’m trying to handle mass email things. You wouldn’t believe the amount of people who don’t like being emailed without their explicit consent, right? So I’d been doing this thing, manually supporting a team in this regard.  But there’s just so many people I have to give the boot!

So I finally got the bright idea, instead of staring at all these emails and going through them, to just separate the good from the bad, and then run the bad through a PHP script that gives me their unsubscribe link. And if cannot find one, I am given the entire email so I can use other means to take care of the removal.

I’m more of a jQuery guy than a Javascript guy. Go figure. I find that it’s easier to use as a front-end developer, like a Javascript Lite (tastes great, less filling). I love when I can type less, and jQuery lets me type less. When I need real Javascript I can pull it out, but I’m not as versed in that area.

I actually get excited when I do things I haven’t done before. Like, I have mouse gestures set up to help me scroll to the top or bottom of a page. When I set it to check a box because I click on a link, the convenience I just created astounds me.  And then when it turns out I have to click the box around the checkbox instead of the checkbox itself, I get frustrated to no end.

Ah, the glorious life of a guy who makes websites when they have an unrelated job.

WordPress: Requiring Login


I know this goes completely against the concept of blogging, but an end-client wants their site to be password protected. Now, one way to do it is to create a .htpasswd file and lock people out of the site that way, but it’s a pain for non-technical people to dig through access logs.  But thanks to the ubiquity of WordPress plugins and a little ingenuity, I am able to accomplish said task. This is being done in WordPress 3.1, so I’m not sure about the backward-compatibility of this. If you would like to comment on this code’s backwards-compatibility, please feel free.

First in the lineup is User Tracking. Thanks to LBAK, that’s one problem solved.

Second up is requiring a user to be logged in. One way to get this done is to edit the wp-blog-header.php file as follows. The script is easy to read, as all it does it call other scripts. Place the following code right under the part that says: if ( !isset($wp_did_header) ) {

if ( !isset($wp_did_header) ) {
     if ( !is_user_logged_in() ) {
          echo '<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
  window.location = "<?php bloginfo('wpurl') ?>/wp-login.php";
</script>
</head>
</html>';
     }

… and you’re done! Now, any user still has access to the Admin area, because the code doesn’t quite reach that far, and if you want to protect your intellectual property that badly, I think you’ll want to keep even the lowest-level users outside of that area.

If so, stay tuned, and you will see exactly where that code would go!