I spend a lot of my time writing and testing prototype code. As a result, I need a good local development environment to work in. Actually two of them: one on my desktop, the other on my Mac Air, which I travel with. To do this I use a suite of technologies and a few server configuration tricks. My technology suite is
- Bitnami MAMP stack – for running a test webserver
- subclipse plugin – for making Eclipse talk to Subversion
- Subversion – for version control and keeping my development in sync across computers
The first thing I need to do to setup this environment is install all the necessary components.
- Install Bitnami MAMP stack all by itself
- Install Eclipse
- Install subclipse plugin
Next I create a new project in Eclipse which points to my Subversion server. IBM has a nice tutorial on how to install and configure subclipse that I used when I was setting this up for the first time.
The last thing I do is tweak Bitnami so it is configured in a more development friendly way. This requires two step:
- Set up the workspace project directory to be accessible by the webserver using an Alias in Apache.
This means opening up the httpd.conf file which will be located in /Applications//Applications/mampstack-versionnumber/apache2/conf
Add the following line Alias /urlyouwant /path/to/actual/workspace/project_directory in my case this is something like
Alias /devnetDemos /Volumes/driveName/somefolder/devnetDemos/
- Change php.ini file to enable logging and debugging of errors. This set the following to variables
error_reporting = E_ALL;
display_errors = On;
log_errors = On
- This will both log and display all types of errors both those that are failures and those that are notifications.
You can also set the errors to log a specific place by setting
error_log = filename;
If you’re not a fan of Subversion (you’re a git fan) then you can make Eclipse talk to a git repository too. There are a couple of plugins out there, the most popular seems to be EGit. If anyone has experience with Git and Eclipse feel free to add a comment on how you’re making it work.
My testing setup is pretty efficient and has several advantages. First, it is easy to refresh if necessary. Second, I don’t have to acquire server space. Third, I can work from wherever. I like this alot because I travel and end up working on the road. I also sometimes like to code while I’m curled up and the laptop is easier to do this on. Thanks to Subversion I can commit things I’m working on and then sync a different computer to the repository and keep working.
I’ve been following the kerfuffle on Twitter about streaming the LITA Board meeting this weekend and thinking a bit about how it represents of the disconnect between physical and virtual participants and communities. In nearly all of my LITA and ALA interactions, virtual participants have almost always been a secondary concern or worse yet and after thought to the event going on. As if members who want to participate virtually are an oddity or outside the norm. As a result, events don’t get planned with virtual and in person participation as EXPECTED from the start. This results in things like the LITA board meeting where the stream was shut down due to the fact LITA didn’t have permission to broadcast the presentation of a consultant who was coming in to the meeting to provide information.
LITA and ALA aren’t the only ones who fall into the trap of forgetting virtual members/participants. I work remotely for OCLC and I can’t tell you how many times people have assumed my physical presence at meetings and created lots of problems as a result. Everyone in every organization who wants to truly engage their community and members needs to ASSUME that there will be people who will need or want to participate both physically and virtual. Otherwise, either physical or virtual participants will be in the backseat.
How can physical participants end up in the backseat? code4lib as a community/organization/whatever is a great example of this. The vast majority of the code4lib community interaction is virtual, whether in IRC channel, listserv or website. As a result, there are certain assumptions that get made when this community comes together physically; typically the annual code4lib conference. Insider info and an understanding of the microculture, that you might not have if you haven’t been a virtual code4lib participant. code4lib is not the norm though. In most library organizations, virtual participants take the backseat, because the organization fail to expect them and engage with them in a consistent fashion. This is frustrating for these participants and only succeeds in alienating them.
Of course, virtual participants will need engage in the discussion in different ways from physical participants and the experiences of the two might not be equivalent. Regardless, there has to be clear ways for each type of participants to interact and organizations should endeavor to make sure the experience is as equivalent as possible. If that means creating standards and practices then so be it. It is clear that organizations have to work at this and PLAN for it, because in general we aren’t digital natives and too many of us assume that interactions will be traditional physical ones. It won’t always be this way, nor IMHO should it. Many organizations and groups operate in a primarily distributed and virtual fashion as a necessity. Two examples of this are the Drupal and Koha user communities. In both these cases, primarily physical interactions are unfeasible because of the global nature of the community. Being a global organization, OCLC doesn’t have the luxury of physical meetings either and the organization gets increasing better at having virtual interactions.
With library budgets shrinking and travel costs increasing, organizations like LITA need to face the reality that virtual participation is likely to become a norm rather than an oddity and shift their culture, practices and expectations to accommodate this model. Failing to do this will lead to members investing time in communities that are capable of meeting their expectations as virtual participants.
There is a good post over at Tinfoil + Raccoon about ereaders and libraries. I found it ironic that both Rochelle and I both had conversations with sales staff at Barnes and Noble about the Nook and libraries. I went in to check out the Nook Color because I was curious what it was like and how it compared to my old school Nook. Rochelle and I live in completely different library districts and this makes a big difference in terms of what is available. I feel very privileged because HCPL has IMHO lots of good ebooks available. I have friends who don’t get nearly as much in the public library’s Overdrive collection.
Post-holidays there have been lots of people talking about the ereader they got and which they prefer on Twitter. I had relatives ask me about my Nook and why I bought over a Kindle or and iPad. Which should they get they asked me. The answer to that question isn’t simple and definitely various from person to person. For me there is a set of questions checklist that I use to help folks figure out what they want.
- What kind of stuff do you read? (Fiction books, Non-fiction books, magazines)
- If you read non-fiction do you highlight stuff when you read?
- Do you want to borrow books from the public library? If so, have you checked out the size of the collection your library has. After looking at the size, do you still want to borrow books?
- Do you want to be able to buy books whenever, where-ever in the US?
- Do you care who you buy your books from? ie. does it bother you to be forced to buy stuff from a single vendor?
- Do you think you might want to use other devices (in particular other ereaders to read your books in the future)
- Do you want to “loan” your ebooks?
- How many devices are you willing to carry around with you? (this question is all about is the person looking for a single function or multi-function device)
Some of these questions are pretty easy for people to answer. Others they are more difficult or never occurred to them to care about so it takes a little more digging and prompting. The bottom line is that you have to help people get the information they need in order to make good decisions.
I’ve been meaning to blog about the fact that the Kindle “buy once” commercials really annoy me. So much so that I want to throw something at the TV every time I see one. Amazon is acting like their format is the friendliest and most device independant when that is FAR from the truth. The Kindle format is no more device independant than Barnes and Noble’s Nook format. I can read my Nook books on all devices that Amazon purports I can read Kindle books on. Oh except the Kindle, but you can’t read Kindle books on Nook so really tell me again what the gain is? Plus as I’ve previously mentioned I can read Overdrive books on my Nook. Until Amazon allows their format to be used on other ereaders (Nook, Sony, various Kobo devices) the “buy once” thing is just spin. Barnes and Noble Nook books have the same problem but at least they use Adobe DRM which makes me hope one day I might read them on other Adobe DRM compatible devices.
That being said, if I truly wanted ebooks that are truly device and platform independent than I’d be better off purchasing from Kobo. Why? Because Kobo books can be read on a variety of readers including the Android, iPhone, iPod Touch, Kobo readers, Sony, and B&N Nook. The only thing they can’t be read on is the Kindle. I actually have a bunch of Kobo books that I downloaded for free and a few I’ve purchased. They work great on my Nook, Android Phone and iPod Touch. Plus I know they would work on other ereaders if I bought one.
I’m curious to see how device independent Google’s ebooks are. I hope they are more like the Kobo books than Kindle Books. But I won’t know until I go get some and try them out, something which I haven’t had time to do yet.
I was going through things in my feed reader today and a post from Web Monkey caught my eye. It was about a website called “20 Things I Learned About Browsers and the Web” which was created by the developers of Google Chrome. The content of the book itself is really interesting and informative. I learned a lot reading it. But what was more jaw dropping was the way in which the site worked and what the developers were able to do because they were using HTML 5. I’ve seen other HTML5 demos and thought they were really cool too but this one got me thinking about how a UI to digital books could work in HTML5. Shows what digital library interfaces could be like.
If you are a web developer who is trying to test scripts there are several things that you should know how to do on your web server. Most of these are Apache settings but if you’re working in PHP some are PHP setting tricks.
- How to setup an Alias and Script Alias
This is important if you want to server up files and folders that exist outside the root folder of the web server. I use this in order to allow my local Bitnami web server to server up my Eclipse workspace directory. This allows me to test code easily and make changes before I commit code to my Subversion repository. I also use it in my website to provide seamless easy access to my mashup demos while having my WordPress installation to live in the web root. It has lots of other uses as well and its definitely something you want to know how to do in Apache
- Log file setup and configuration
Knowing how to setup your server to log transactions is critical. Without working error log files you’ll be stumbling around in the dark when you are trying to debug. Additionally, server transaction logs are crucial if you want to track traffic on your site. If you want particular information in your log files then you’ll want to set them up to use a custom format. You can also configure where your log files are stored which is very helpful if you want to move them to a mounted drive when they get large
- How to setup a virtual host
Setting up a virtual host is really helpful if you want to use the same server for multiple applications but not have them in separate directory. So you could have something like drupal.librarywebchic.info and wordpress.librarywebchic.info using a single web server.
- How to change the Document Root
If you want the files for your website to be located in a particular place on your web server then you’ll need to be able to change the Document Root to point to the place where those files are.
- How to turn on Logging and Display of Errors in PHP
Depending on how PHP is setup by default on your server, PHP may not be setup to log or display errors. If these are both turned off then debugging code will be much more difficult. So go in and edit your php.ini file to turn on both display and logging of errors on your test server.
- How to up your PHP memory cache
Another setting in php.ini that you may want to change is your memory cache. More memory can improve the performance of your application and in the case of some application may be required. So you’ll want to know how to make this change
- How to change your PHP file upload limit
php.ini also contains a setting for the maximium file size that can be uploaded. By default it is set relatively low, if you want to upload larger files then you’ll need to increase this setting.
- How to start and stop Apache
All of the above changes require Apache to be restarted. So it is critical that you know how to do this.
Nearly all of these tasks are well documented in the PHP or Apache documentation. Check this out if you need to make these changes.
I realized this month that I’ve been a remote employee for nine months now. I went into it thinking that being a remote employee wouldn’t be that difficult. After all a computer is a computer and why does it really matter where I work from. While that is true, I won’t say that working remotely is easy. Something is more difficult, some easier. Nine months in I have a few lessons to share:
- Find a routine and stick to it. For me the weirdest thing with working remotely was daily routine. People who go to work; get up shower, pick out outfit of the day, eat breakfast, brush teeth, pack lunch, etc. Working remotely almost none of that has to be true, which may be a good thing or may not. For me, in order to separate my work time from my not work time, I need the trappings. So I follow nearly the same routine I did when I went to work in an office every day. Which means you rarely find me working in my PJs or ratting jeans. Mostly its blouses, slacks, and dress shoes. I do often go shoeless, because I have a love/hate relationship with shoes. I love how cute they are, I hate that some of them hurt my feet. My spouse find the fact I get dressed for work everyday odd, but for me it is one of the signals that I am “on the job”. My “off the job” signals are similar. If I use my computer in the evening, I have a strict rule about email/VPN. When email and VPN are open I’m on the clock.
- Make sure you still build relationships with the people you work with. Empathy and getting along with others means knowing something about them. Working remotely its easy to only view the people you work with as cogs in the wheel because you don’t really have any non-work contact with them. One of the best things my boss did when I came to the office was to make sure I had non-work time with colleagues. Just having time to get to know people when you work remotely is important. I Facebook and Twitter with colleagues from work because its a way to try to know who they are beyond their job.
- People will forget you work remotely – frequently. If 90% of the people you work with don’t work remotely, they will likely forgot that you work remotely. Don’t take it personally. Just gently remind them you’re remote. A quick, “hey could you send me the Powerpoint you’re showing” is sometimes necessary. When folks make meetings make sure when you accept they haven’t forgot a conference call number, if they have, they think you’re physically there.
- With great flexibility comes great responsibility. One of the nice things about working remotely is that you can work flexible hours. This is nice for you because if you need to run an errand during the day you can just make up the time. Flexibility is a two way street though. If you take advantage of flexible work hours you should be willing to allow your company to do the same, particularly if your colleagues are spread out over several timezones on different continents. So work early or late when necessary. It’ll make a world of a difference for you co-workers.
- Bake cookies for tech support – Working remotely, you are completely reliant on technology to do your job. This means you need good tech support for when the VPN does work or you can’t map your shared drive. The tech support team is your best friend at times like these. It may take them a while to diagnosis the problem due to the extra “I’m a remote employee” variables but they’ll come through so thank them for their efforts. How is your choice.
- Get used to email – When you work remotely, email is the bread and butter of your existence. Yes, there are video chats, conference calls, etc. But the majority of business happens over email, so come up with a system of managing it.
- Find a communication tool for quick questions and help – Sometimes you need to have a point of need conversation. The kind you’d normally just drop into someone’s office for. I use chat either IM (AOL, GChat, Yahoo) or Skype chat to fill this need. So I’ve tried to get chat and/or Skype information for as many of the people I work closely with as I can.
This week I’ve been at the Access conference in Winnipeg. Its been a great three days. I present on OCLC web services, learned lots and am going home with a ton of things to think about.
One thing I learned the very first day from Dan Chudnov has made a big difference for me. Dan and I were working with several folks on a Hackfest project and I needed to share the bits of code that I had written with the group. Dan showed me Gist which I’d never used before. What Gist lets you do is paste code into a form and allow it to be publicly or privately viewable. You can then send a URL for that code to someone.
For me being able to send someone a URL for code is nice but what is even better for me is that Gist will give you a snippet that you can cut and paste into something like Drupal or WordPress to display the code you’re sharing.
For me this is a lifesaver because I spend a lot of time sharing code in my blog and on the Developer Network blog. This isn’t always easy because if you just cut and paste the code then bad things can happen.
With gist I can now post the code there and then easily embed it in my posts. No fuss, no muss.
Two weekends ago I enabled multi-blogging in WordPress in order to be able to have multiple blogs as part of my site. Because my main blog didn’t sit in the root of my website this presented an issue. You can’t run the multi-blog features of WordPress 3.0 unless your have WordPress installed in the site root. Luckily, I know enough about Apache configuration to alter the Apache settings on my web host to move my blog to the web root and redirect all the urls appropriately. The next issue I encountered was the fact that I needed to use the subdomain settings rather than the subdirectory option because there is a bug in WordPress that won’t let you use subdirectories if your existing WordPress installation has been set up for more than a month. Once this problem was solved (thanks to Blake who made the DNS changes), I discovered that the plugin use to get my Flickr photos in my site stopped working when I upgrade to 3.0. I haven’t yet found a solution to this problem. I keep hoping that the maintainer of the Flickr Manager will update the plugin but I may have to start using a different plugin instead. The best candidate is the Flickr Gallery plugin. This plugin allows you to add Flickr photos to posts and page but it just isn’t as slick as Flickr Manager.
Overall I’m happy with the change. My redirects seem to be working to take people from the old urls to the new ones. Biggest problem is that I need to fix my test server setup. I don’t know whether I want to pay for a different domain for testing, test locally, or create a test directory somewhere within my www.librarywebchic.net host. Whatever I do, it’ll be some work to re-create the things I had. Hopefully I can find the time to get some of this done on the weekend.
One of the things I’ve learned working with Drupal is that are often many ways to accomplish the same goal. Sometimes this is a good thing because it gives one choices and options. Install one module or another, or use functionality which is part of the Drupal core. One example of this is how one chooses to accomplish themeing. The typical way to do theming is to alter the tpl.php file or create custom ones. However another option for themeing is to use the Contemplate module which allows one to accomplish many of these themeing task from within the Drupal administrative interface. There are strengths and weaknesses to each approach. Contemplate can crash your whole site or portions of it if you put in bad PHP code. It also can create security issue. So I don’t typically alter my templates with Contemplate. However, I still have it installed on my test server because it helps me figure out what the possible fields are in a given template. Also, I have control of my servers (well a reasonable amount of control) so I’m comfortable using templates for themeing. If I didn’t have server access or it took a while to push changes to template to a server, I might be using Contemplate (with care of course).
Another example of two ways to the same thing is the choice between using the core Blocks functionality to place content in particular regions or using the Context module to accomplish this task. The core Blocks functionality has the advantage of the fact that it is part of the Drupal core and means you don’t have to install anything else. However, it can be pretty cumbersome to use for a large site. In contrast, the Context module is quite easy to use and great if you have a big site with clearly defined sections. Using Context you can create sections for your site. Once you have sections you can put particular blocks in particular regions on you site. you can also customize things like your active menu.
Another example of two ways to do the same thing in Drupal is using the Event module versus using Date and Calendar to create an event calendar. Originally, I felt like Event was the better way to go because it produce a better experience for content creators. However the Date field module has gotten better and is able to overcome some of the limitations that had kept me from using it on previous projects. Plus the Views integration can’t be beat, particularly since Event doesn’t have Views integration. As a result, I’ve switched how I create event calendars in Drupal.
A final example of choices in Drupal involves Views. Views are VERY powerful within Drupal and if you’ve never used View Attachments then you need to take the time to understand them. Essentially, View attachments allow you to pull different View displays into a Page or Block display. Page and Block displays can have multiple attachments. This is super powerful because it allows you to take sets of content and combine them, in a similar way to how you might use a bunch of Block displays of a View within a single page. By using attachments you can take a bunch of view content and put in the same web page. You can also use attachments to attach additional content to a block. This can be a huge time saver for page creation and you don’t have to mess with blocks. The biggest potential pitfall is that you have to be careful how much free text you have within the web page you are trying to create. While you can put this into the View via the Header or Footer, you don’t get a WYSIWYG for formatting and it also means people updating that page’s free text content have to have permission to edit Views. (A potentially dangerous thing) In my case, I have tiny amounts of free text and it isn’t something that others really need to update so the Badges and WorldCat Affiliate Services pages on the Developer Network site use Views and Attachments.
The biggest thing I’ve learned with Drupal is that when I finish a project I will almost always see a new and different way to do the same thing. I’m going through this with the Developer Network site. There are some things I know would do differently and there are other things I wish I’d tested my options more before making a decision. Its all about balancing complexity, flexibility and functionality. As I’m fond of telling people there is only the best solutions for any given moment.