Poll: Your preferred method for coding on a remote server?
It often happens that you're on a project that must be accessed over the 'net even for development. (Case in point: PayPal integration. Facebook app. Anything where a proprietary SaaS calls back your URLs.)
What's your or your team's preferred method to write code then? (The one you do most often, if you use more.)
39 comments
[ 2.6 ms ] story [ 107 ms ] thread;-)
wikipedia : http://en.wikipedia.org/wiki/NX_technology
If the idea of having HTTP on your laptop does not fill you with mortal dread, Twilio has an OSS called localtunnel which makes your laptop web-accessible in seconds.
2). Source control for every change, deploy scripts to get it to environments safely and repeatably. DVCSes handle lots of little changes fairly elegantly, and you can squash a range of them after you e.g. figure out the magic incantation to get a foreign API working right. (Turning thirty one-character commits and ten deploy tags into a single "Foreign API now works" commit.)
I have done cowboy coding in Putty in the past. There is no excuse for it.
http://progrium.com/localtunnel/
You can roll your own, but I'm happy to use Tunnlr.
It can use several different protocols to connect remotely, but I typically use ssh. I also use dired in that case, which is the Emacs directory editor to browse the remote directory structure and open other files. TRAMP can even launch remote compilation now, which is pretty great.
I use TRAMP + EMACS for all server side development I do and love it. The only annoyance is the slight delay between hitting Ctrl-X-S and the time it takes to save. Then when I use EMACS on a local machine I'm just amazed at how fast it can save a file :)
Try using a web service mocking software and learning how to work your hosts file. Soap UI comes to mind... or whack together manual services on test boxes.
If you capture an coming response, maybe using fiddler or something, or if using visual studio its a breeze. Then just set up a basic web service that returns you data as you captured, no processing needed at all. Or even just set up some proper routing. There isn't really an excuse doing cowboy work will bite, maybe not today, but later.
I've seen to many huge f/k ups and been responsible for €50,000 mistake myself mucking with a live server with no testing environment.
My favourite for this is virtualisation BTW. Taking server snap shots of production, dumping them in a sand box where I have mocked third party set ups, and hack away. Makes releasing, testing, everything breeze. Big time cost up front, but it pays itself back ten fold on the first smooth release.
I've recently starting moving towards local Vagrant instances. I don't like dealing with local library installs on my Mac, and Vagrant makes it stupid easy to repeat my dev setup. It also gives me a good starting point for provisioning servers (using Puppet), thought I haven't fully consolidated the local dev and server Puppet manifests, yet.
Which might be u9fs via ssh | ftp | drawterm | cpu | sshnet & AoE | import | sshnet & ftp | import /net & AoE | import /net & ftp
The possibilities are numerous
Trying to do the same sort of thing with MacFuse in OSX was an absolute nightmare though (slowwww), but perhaps I was holding it wrong.
Before I used ZDE 5.5 for PHP dev. and opened the files remotely via SFTP. It was also not bad, though ZDE 5.5 is really buggy.
What I miss is an editor which supports opening files via SFTP and doing that fast (as ZDE) and is not that buggy (not as ZDE) and supports autocomplete.
http://www.exratione.com/2011/08/use-rsync-scripts-for-painl...
If you're using SSH, an editor and terminal that supports GPM mouse over SSH (eg: iTerm2 on OS X and Vim on the backend) makes life easier.
It's rarely necessary. For Facebook in particular, 95% of the integration happens at the web browser level via signed URLs and/or Flash - Facebook's servers rarely talk directly to your servers or vice versa. Just run a web server locally and put 127.0.0.1 in your hosts file.
It's like a combination of "I SSH into a server, and work there using VIM/EMACS/etc." and "I use a local VIM/EMACS/MC/etc to open files remotely over SSH/FTP.".
You SSH in and type "vi foo.py" in the remote shell, but the file opens in your local Vim. When you save it's automatically transferred across.
For debugging calls such as those received by PayPal, I start by writing a small script that logs the GET or POST request, then write a simple test page that POSTS to the local script that I'm developing.
At any rate, if the only way to test the majority of your code is via a POST, there's something wrong with the way you're writing code; the objects you've created you should be able to test independently, for a start :)
A few years ago I worked at a place where they gave us a local windows box and a remote headless linux box where the code ran (this was before virtualization was ubiquitous). I used cygwin on windows and forwarded X11 sessions running on the remote linux box to my windows box over ssh.
windows w/putty: http://tldp.org/HOWTO/XDMCP-HOWTO/ssh.html OSX: http://dyhr.com/2009/09/05/how-to-enable-x11-forwarding-with...
It let me run eclipse and other GUI apps on the linux box, but have them mostly feel like native apps (well, native X11 apps) on the windows box.
To be honest, since GAE all I do now is open notepad2 and code, nothing else, then deploy and presto. I remember the old days when having apache, filezilla, svn, and a plethora of sys tools was the order of the day.
Coding is more fun when it is pure coding and nothing else than coding. Thanks GAE.
A number of Mac file transfer clients and text editors support this type of integration.
make changes locally, merge into remote environments branch, run fabric command that pushes change up to git hosting server, ssh's into remote server based on current branch then pulls changes from repo hosting servers & runs a few other bits remotely (migrations etc) depending on what has changed
I use codebasehq.com btw, been ace but i dont see a great need to use their deployment service.